Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
127
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. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fakemeta_util>
  5.  
  6. #define ForPlayers(%1) for(new %1 = 1; %1 <= 32; %1++)
  7.  
  8. #pragma semicolon 1
  9.  
  10. new const Float:checkStartTime = 30.0;
  11.  
  12. new const checkAdmin = false;
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin("Respawn_Alert", "1.0", "Toldi");
  17.  
  18. register_logevent("roundStart", 2, "1=Round_Start");
  19.  
  20. loadConfigFile();
  21. }
  22.  
  23. public plugin_precache()
  24. {
  25. loadConfigFile();
  26. }
  27.  
  28. public loadConfigFile()
  29. {
  30. new path[128];
  31. get_configsdir(path, charsmax(path));
  32. server_cmd("exec %s/Respawn_Alert.cfg", path);
  33. server_exec();
  34. }
  35.  
  36. public roundStart()
  37. {
  38. set_task(checkStartTime, "checkUserRespawn");
  39. }
  40.  
  41. public checkUserRespawn()
  42. {
  43. ForPlayers(i)
  44. {
  45. if(get_user_team(i) != 1 || !is_user_alive(i) || !checkAdmin && get_user_flags(i) & ADMIN_BAN || cs_get_user_buyzone(i))
  46. {
  47. continue;
  48. }
  49.  
  50. fm_set_user_health(i, 0);
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement