This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

ChatColor Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
satelitegames
Member
Join Date: Nov 2010
Old 03-25-2012 , 23:36   ChatColor Problem
Reply With Quote #1

Hello I come here to ask for a help and I think that simple thing, so I would like to know how to ChatColor appear to all players on the server, after you have changed the player's Glow.

PHP Code:
ChatColor(id"%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1."PREFIX_BRGAMES_1szNameszName2


below code

PHP Code:
#include <amxmodx> 
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <satelite>

#define PREFIX_BRGAMES_1 "^4(^3( ^4BRGaMes^3!^4CS ^3)^4) ^1"

public plugin_init() 

    
register_plugin("[BRGaMes!CS] Glow Menu""1.0""Satelite"
    
register_clcmd("amx_glow","glow_menu"); 
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)

    
register_logevent"RoundStart"2"1=Round_Start" );
    
register_logevent"RoundEnd"2"1=Round_End" );


public 
fw_PlayerSpawn_Post(id

    
set_user_rendering(id)    
}

public 
RoundStart(id)
{
     if( 
is_user_aliveid ) )
     {
          
set_user_rendering(idkRenderFxNone000kRenderNormal);
     }
}

public 
RoundEnd(id)
{    
     if( 
is_user_aliveid ) )
     {
          
set_user_rendering(idkRenderFxNone000kRenderNormal);
     }
}

public 
glow_menu(id

    if (
cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id)) 
    {  
        return 
PLUGIN_HANDLED
    } 
    new 
menu menu_create("[BRGaMes!CS] Glow Menu:""glow_menu_handler"); 
    
    new 
players[32], pnumtempid
    new 
szName[32], szTempid[10]; 
    
    
get_players(playerspnum"a"); 
    
    for( new 
ii<pnumi++ ) 
    { 
        
tempid players[i]; 
        
        if (
cs_get_user_team(tempid) != CS_TEAM_T
        { 
            continue; 
        } 
        
        
get_user_name(tempidszName31); 
        
num_to_str(tempidszTempid9); 
        
menu_additem(menuszNameszTempid0); 
    } 
    
    
menu_display(idmenu); 
    return 
PLUGIN_HANDLED


public 
glow_menu_handler(idmenuitem

     if( 
item == MENU_EXIT 
     { 
          
menu_destroy(menu); 
          return 
PLUGIN_HANDLED
     } 
    
     new 
data[6], iName[64]; 
     new 
accesscallback
     
menu_item_getinfo(menuitemaccessdata,5iName63callback); 
    
     new 
tempid str_to_num(data); 
     new 
szName[32], szName2[32]; 
     
get_user_name(idszName31); 
     
get_user_name(tempidszName231);

     new 
iRandomNum
     iRandomNum 
random_num1)
     switch( 
iRandomNum )
     {
          case 
1set_user_rendering(tempidkRenderFxGlowShell25500kRenderNormal10)  // Vermelho
          
case 2set_user_rendering(tempidkRenderFxGlowShell02550kRenderNormal10 // Verde
          
case 3set_user_rendering(tempidkRenderFxGlowShell00255kRenderNormal10 // Azul
          
case 4set_user_rendering(tempidkRenderFxGlowShell2550228kRenderNormal10 // Rosa
          
case 5set_user_rendering(tempidkRenderFxGlowShell1920255kRenderNormal10 // Roxo
          
case 6set_user_rendering(tempidkRenderFxGlowShell2552550kRenderNormal10 // Amarelo
     
}

     
ChatColor(id"%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1."PREFIX_BRGAMES_1szNameszName2)
    
     
menu_destroy(menu); 
     return 
PLUGIN_HANDLED
}

// ChatColor!
stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Verde
    
replace_all(msg190"!y""^1"// Cor Padrão do CS
    
replace_all(msg190"!team""^3"// Cor do Time
    
replace_all(msg190"!team2""^0"// Cor do Time 2
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

The post is only showing up to the player that replaced the glow of the Prisoner
__________________




satelitegames is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 03-25-2012 , 23:49   Re: ChatColor Problem
Reply With Quote #2

PHP Code:
ChatColor(id"%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1."PREFIX_BRGAMES_1szNameszName2




PHP Code:
ChatColor(0"%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1."PREFIX_BRGAMES_1szNameszName2
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Old 03-26-2012, 12:23
Napoleon_be
This message has been deleted by Napoleon_be.
satelitegames
Member
Join Date: Nov 2010
Old 03-26-2012 , 14:22   Re: ChatColor Problem
Reply With Quote #3

wickedd hello, my problem and that this post appears for all players in the server.


example:

PHP Code:
if( is_user_aliveid ) ) 

      
ChatColor(id"%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1."PREFIX_BRGAMES_1szNameszName2)

For all players from the server to see the message in the chat
__________________




satelitegames is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-26-2012 , 15:01   Re: ChatColor Problem
Reply With Quote #4

I think u mean,
PHP Code:
ColorChat(idCOLOR"%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1."PREFIX_BRGAMES_1szNameszName2
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 03-26-2012 at 15:01.
Bilal Pro is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 03-26-2012 , 15:08   Re: ChatColor Problem
Reply With Quote #5

If you want everyone to see it,change "id" to "0".

ChatColor
(0, "%s O Guarda ^4%s ^1mudou a cor do Prisioneiro ^4%s^1.", PREFIX_BRGAMES_1, szName, szName2)

Last edited by wickedd; 03-26-2012 at 15:12.
wickedd is offline
satelitegames
Member
Join Date: Nov 2010
Old 03-26-2012 , 19:33   Re: ChatColor Problem
Reply With Quote #6

Hello Thanks a lot!, That was it
__________________




satelitegames is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode