I try to make make clients who are in the terrorists or CT team say "I'm a terrorist or CT" when the doAction in the plugin is triggered or as soon they are terrorist or CT. When i use the below script clients who are not terrorist or CT say each 2 secconds "I'm a terrorist or CT". However these clients aren't terrorist or CT the "client_cmd(id,"say I'm a terrorists or CT")" line in the script is executed what shouldn't be happened if im right. Anyone can tell me what i did wrong or make a working script?
PHP Code:
public doAction(id)
{
if ( get_user_team(id) != 1 && get_user_team(id) != 2 )
{
set_task(2.0, "doAction",id)
}
client_cmd(id,"say I'm a terrorist or CT")
}