| RollerBlades |
06-23-2011 07:28 |
Need help!
ok i made a menu and i need help here with random rewards
PHP Code:
public random_reward(wepmenu) { static i, player[32], playerCount, id; get_players(player, playerCount, "ah"); static RandomNum; RandomNum = random_num(0, 5); for ( i = 0; i < playerCount; i++ ) { id = player[i]; if ( RandomNum == (2) ) { sh_give_weapon(id, CSW_AWP, true); client_print(id, print_chat, "[AMXX] Congratulations! You Just Won A AWP!"); menu_destroy(wepmenu); } else if ( RandomNum == (3) ) { sh_give_weapon(id, CSW_FAMAS, true); client_print(id, print_chat, "[AMXX] Congratulations! You Just Won A FAMAS!"); menu_destroy(wepmenu); } else if ( RandomNum == (5) ) { sh_give_weapon(id, CSW_SG552, true); client_print(id, print_chat, "[AMXX] Congratulations! You Just Won A SG552!"); menu_destroy(wepmenu); } else { client_print(id, print_chat, "[AMXX] Better Luck Next Time"); menu_destroy(wepmenu); cmd_menu(id) //<<<< can i return to the menu without doing this?? just wanna know... } } }
ok, so can i stop the random looping when its not being used`??
|