Advertisement
DecaK

Untitled

Feb 8th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <cstrike>
  4.  
  5. public plugin_init() {
  6. register_plugin("Respawn", "1.0", "DecaK")
  7. register_clcmd("say /respawn", "respawnuj")
  8. register_event("DeathMsg", "Smrt", "a")
  9. }
  10.  
  11. public respawnuj(id) {
  12. if(is_user_alive(id) || !is_user_connected(id)) return PLUGIN_CONTINUE;
  13. new tim = CsTeams:cs_get_user_team(id)
  14. if(tim == CS_TEAM_CT || tim == CS_TEAM_T) ExecuteHamB(Ham_CS_RoundRespawn, id)
  15. }
  16.  
  17. public proveriRespawn(id) {
  18. if(is_user_alive(id) || !is_user_connected(id)) return PLUGIN_CONTINUE;
  19. new tim = cs_get_user_team(id);
  20. if(tim == CS_TEAM_CT || CS_TEAM_T) ExecuteHamB(Ham_CS_RoundRespawn, id)
  21. else set_task(5.0, "proveriRespawn", id)
  22. return 1;
  23. }
  24.  
  25. public client_death(a1,id,a3,a4,a5) set_task(2.0, "respawnuj", id)
  26. public client_putinserver(id) set_task(5.0, "proveriRespawn", id)
  27. public Smrt() set_task(5.0, "respawnuj", read_data(2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement