I thought I fully tested this but it seem like like only the server send out the message.. I wonder what the hell I was on when I was doing all these messaging logging.
Code:
register_logevent("on_PlayerAction",3,"1=triggered")
public on_PlayerAction()
{
new sArg[MAX_VAR_LENGTH], sAction[MAX_VAR_LENGTH]
new sName[MAX_NAME_LENGTH]
new iUserId, id
read_logargv(0,sArg,MAX_VAR_LENGTH)
read_logargv(2,sAction,MAX_VAR_LENGTH)
parse_loguser(sArg,sName,MAX_NAME_LENGTH,iUserId)
id = find_player("k", iUserId)
if(!id)
return PLUGIN_CONTINUE
// Bomb planted
if (equal(sAction,"Planted_The_Bomb"))
{
client_print(0, print_chat, "Zomg %s Planted the bomb", sName)
}
else if (equal(sAction,"Defused_The_Bomb")) // Bomb defused
{
client_print(0, print_chat, "Zomg %s defused the bomb", sName)
}
}