AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Client_Print (https://forums.alliedmods.net/showthread.php?t=168935)

enjoi. 10-06-2011 08:17

Client_Print
 
How do I make it so it prints in colorchat with client_print. I'm not sure how to do this. Can anybody give me an example?>
PHP Code:

Slayaim(id)
{
    new 
playerbody;
    new 
szPlayerName[32];
    
get_user_aiming(idplayerbody);
    
get_user_name(playerszPlayerName32);

    if (
get_user_flags(id) & ADMIN_BAN)
    {
        if (
is_user_alive(player) && get_user_flags(player) & ADMIN_IMMUNITY)
        {
            
client_print(id"You cant slay some one with Immunity!");
        }
        else
        if (
is_user_alive(player))
        {
            
user_kill(player);
            
client_print(player"You have been Slayed!");
            
client_print(id"You just Slayed %s!"szPlayerName);
        }
    }



iplayz 10-06-2011 08:26

Re: Client_Print
 
ColorChat(0, GREY, "You're text will appear in GREY!")

Make sure you have #include <colorchat> aswell

enjoi. 10-06-2011 08:27

Re: Client_Print
 
Yeah. I know about include colorchat. Will respond in like 8 hours if it works. Have to go to work.

Napoleon_be 10-06-2011 09:11

Re: Client_Print
 
PHP Code:

Slayaim(id

    new 
playerbody
    new 
szPlayerName[32]; 
    
get_user_aiming(idplayerbody); 
    
get_user_name(playerszPlayerName32); 

    if (
get_user_flags(id) & ADMIN_BAN
    { 
        if (
is_user_alive(player) && get_user_flags(player) & ADMIN_IMMUNITY
        { 
            
ColorChat(idNORMAL"^x04GREEN^x03 TEAM_COLOR^x01 NORMAL COLOR"); 
        } 
        else 
        if (
is_user_alive(player)) 
        { 
            
user_kill(player); 
            
ColorChat(idNORMAL"^x04GREEN^x03 TEAM_COLOR^x01 NORMAL COLOR");
            
ColorChat(idNORMAL"^x04GREEN^x03 TEAM_COLOR^x01 NORMAL COLOR");
        } 
    } 




All times are GMT -4. The time now is 00:46.

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