seroff

Spec OFF 1.0 By Seroff

Jan 10th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. static user_team[33][33],PLUGIN[][]={
  4. "Spec OFF",
  5. "1.0",
  6. "Seroff"
  7. };
  8.  
  9. public plugin_init(){
  10. register_plugin(PLUGIN[0], PLUGIN[1], PLUGIN[2]);
  11. register_event("TeamInfo", "EVENT_Team", "a");
  12. }
  13.  
  14. public EVENT_Team()
  15. {
  16. new Client = read_data(1);
  17. if(not_check(Client)) return 0;
  18. read_data(2, user_team[Client], 32);
  19. if(user_team[Client][0]=='S' || user_team[Client][0] == 'U')
  20. {
  21. set_task(5.0,"spect_off",Client);
  22. }
  23. return 0;
  24. }
  25.  
  26. public spect_off(id){
  27. if(user_team[id][0]=='S' || user_team[id][0] == 'U'){
  28. server_cmd("kick #%d ^"Not accept Spectator^"",get_user_userid(id));
  29. }
  30. }
  31.  
  32. public client_disconnect(id){
  33. if(task_exists(id)){
  34. remove_task(id);
  35. }
  36. }
  37.  
  38. stock bool:not_check(id){
  39. new Players[32],Count, i, player;
  40. get_players(Players, Count, "ch");
  41. for (i=0; i<Count; i++) {
  42. player = Players[i];
  43. if(player!=id) { return true; }
  44. }
  45. return false;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment