Raised This Month: $ Target: $400
 0% 

[ZP]Message in chat when user buys an extra item!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lagger
Member
Join Date: Feb 2011
Location: Latvia
Old 06-18-2012 , 13:04   [ZP]Message in chat when user buys an extra item!
Reply With Quote #1

Hello so i wanted,that when user buys an item in chat shows message,that he bought it.(colored)
So here is code i figured out,i think something is wrong.
P.S i will add this code to plugin,im not making a new plugin!

PHP Code:
public message(id)
{
    new 
player_x[32]
    
get_user_name(player_x)

    
chat_color(0,"!g[ZP] %s !yjust bought !gITEM!y!",player_x)
}

/* and end of the plugin is this */

stock chat_color(const id, const input[], any:...)
{
    new 
count 1players[32]

    static 
msg[191]

    
vformat(msg190input3)

    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!y""^1")
    
replace_all(msg190"!t""^3")
    
replace_all(msg190"!t2""^0")

    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()
            }
        }
    }

Please help me to make this code correct,thanks.

Last edited by lagger; 06-18-2012 at 13:08.
lagger is offline
Send a message via Skype™ to lagger
 


Thread Tools
Display Modes

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 06:18.


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