Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3. #define WHITE 0x01
  4. #define DARKRED 0x02
  5. #define VERSION "1.0"
  6.  
  7. public Plugin:myinfo =
  8. {
  9. name = "MapchangeForcer",
  10. author = "1NutWunDeR",
  11. description = "Maps won't change if mp_ignore_round_win_conditions is set to 1. This plugin forces a round/map end and allows weapon drops!",
  12. version = VERSION,
  13. url = ""
  14. };
  15.  
  16. public OnMapStart()
  17. {
  18. CreateTimer(1.0, CheckRemainingTime, INVALID_HANDLE, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
  19. }
  20.  
  21. public Action:CheckRemainingTime(Handle:timer)
  22. {
  23. new timeleft;
  24. GetMapTimeLeft(timeleft);
  25. if (timeleft==0)
  26. {
  27. ServerCommand("mp_ignore_round_win_conditions 0");
  28.  
  29. for(new i = 1; i <= MaxClients; i++)
  30. {
  31. if(IsValidClient(i, true) && !IsFakeClient(i))
  32. {
  33. ForcePlayerSuicide(i);
  34. }
  35. }
  36. }
  37. }
  38.  
  39. stock bool:IsValidClient(client, bool:bAlive = false)
  40. {
  41. if(client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (bAlive == false || IsPlayerAlive(client)))
  42. {
  43. return true;
  44. }
  45.  
  46. return false;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement