Raised This Month: $ Target: $400
 0% 

[ SOLVED ] [ Duplicate Say ]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Xablau
Member
Join Date: Dec 2014
Old 01-08-2015 , 05:28   [ SOLVED ] [ Duplicate Say ]
Reply With Quote #1

I have bug
Duplicate say on green chat

PHP Code:
public plugin_init() 
{
    
register_clcmd("say""handle_say")
}
public 
handle_say(id)
{
    new 
message[192]
    
read_args(message191)
    
remove_quotes(message)
    
    new 
name[32]
    
get_user_name(idname31)
    
    new 
alive is_user_alive(id)
    
    if(
alive)
        
format(message191"^x03%s^x01 : ^x04 %s"namemessage)
    else
        
format(message191"^x01*DEAD* ^x03%s^x01 : ^x04 %s"namemessage)
    
    for(new 
1<= gMaxPlayersi++)
    {
        if(!
is_user_connected(i))
            continue
    
        if(
alive && is_user_alive(i) || !alive && !is_user_alive(i)) // Prints the message
        
{
            
message_begin(MSG_ONEgMsgSayText, {000}, i)
            
write_byte(id)
            
write_string(message)
            
message_end()
        }
    }
    return 
PLUGIN_CONTINUE


Last edited by Xablau; 01-08-2015 at 05:37. Reason: Solution: register_message()
Xablau is offline
 



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 15:23.


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