So i am trying to make an improved version of DoD Ninja for a server that i play on but the feature that they wanted the most i cant seem to get to work, i am trying to get it so that a ninja is chosen every like 35 seconds but i cant seem to get it to work, when i enable the random niinja mode at first it gives me an error: ninjamod.sma::random_event (line 245)
PHP Code:
public random_event(){
player_count = get_playersnum();
new maxpl = get_maxplayers()
new Player = random_num(1, maxpl)
if (player_count < 1) {
//time_remaining = Float:get_systime()
random_event()
return;
}
else if( player_count >= 1 && is_user_connected(Player) == 0 ){
** random_event()
return PLUGIN_CONTINUE
}
else if( player_count >= 1 && is_user_connected(Player) == 1 ){
if ( g_status[Player] == true ){
random_event()
return PLUGIN_CONTINUE
}
else if( g_status[Player] == false ){
set_task(35.0, "give_ninja", Player, "b")
random_event()
return PLUGIN_CONTINUE
}
}
}
which is the line with the stars at the begining of it, then it assigns ninja nonstop for like 10 seconds, im not sure exactly why, if you need me to post all my code i will be happy to but ill warn you it isn't very clean
thanx for any help i receive