I started coding today and im sorta a toal' noob.
I want to make it so if a bot dies, he gets kicked. I've read about read_data, but couldn't get to know enough of it. What am I doing right/wrong?
Code:
public plugin_init(){
register_event("DeathMsg","event_kickbot","a")
}
public event_kickbot()
{
new victim = read_data(2)
if(is_user_bot(victim)){
server_cmd("kick ^"victim^"")
}
}