AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MSG_ONE or MSG_ONE_UNRELIABLE with no target entity NEED HELP! (https://forums.alliedmods.net/showthread.php?t=89661)

biscuit628 04-09-2009 05:12

MSG_ONE or MSG_ONE_UNRELIABLE with no target entity NEED HELP!
 
PHP Code:

    for(new <= g_iMaxPlayers a++)
    {
        if(!
is_user_alive(a) || (get_user_flags(a) & ADMIN_BAN))
        {
                if(!
is_user_alive(id) && get_user_team(id) != && (get_user_flags(id) & ADMIN_BAN))
                {
                    
format(message,127,"^x04[ADMIN] ^x01SCORE:%d ^x03*DEAD* ^x03%s^x04 : %s",get_user_frags(id)-get_user_deaths(id),name,text)
                
client_color(a,id,message);
                }

                else if(!
is_user_alive(id) && get_user_team(id) != 0)
                {
                
format(message,127,"^x01SCORE:%d ^x03*DEAD* ^x03%s^x01 : %s",get_user_frags(id)-get_user_deaths(id),name,text)
                
client_color(a,id,message);
                }
        }
    } 

PHP Code:

stock client_color(playeridcoloridmsg[]){
    
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
    
write_byte(colorid)
    
write_string(msg)
    
message_end()


i scripting my chat with score plugin..but when i test it,it get something error..
..anyone can help me..

xPaw 04-09-2009 05:20

Re: MSG_ONE or MSG_ONE_UNRELIABLE with no target entity NEED HELP!
 
PHP Code:

get_user_team(id) != 0

// ->

is_user_connectedid 

PHP Code:

stock client_colorindexiColorszMessage[] ) {
    if( 
index )
        
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ), _index );
    else
        
message_beginMSG_BROADCASTget_user_msgid"SayText" ) );
    
    
write_byteiColor );
    
write_stringszMessage );
    
message_end( );




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

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