I was trying to make such a plugin that when any user writes a command ie. "amx_power" it changes a certain sprites color for this user only.
So i checked another plugin and it was changing the sprites color like this:
Code:
#include <amxmodx>
#include <fakemeta>
...
new gMsgPowerUp;
public plugin_init()
{
...
gMsgPowerUp = get_user_msgid( "Powerup" );
register_message( gMsgPowerUp, "Message_Powerup" );
...
}
public Message_Powerup()
{
set_msg_arg_int( 2, ARG_BYTE, 255 );
set_msg_arg_int( 3, ARG_BYTE, 0 );
set_msg_arg_int( 4, ARG_BYTE, 0 );
}
How would you change this code to work the way that any user writes "amx_power" and it changes the sprite color for him only?