Advertisement
xNos

Untitled

Aug 19th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.70 KB | None | 0 0
  1. /* Plugin Template generated by Pawn Studio */
  2.  
  3. #pragma semicolon 1
  4.  
  5. #include <sourcemod>
  6. #include <cstrike>
  7.  
  8. new bool:StartMap = false;
  9.  
  10.  
  11. public Plugin:myinfo =
  12. {
  13.     name = "StartMap Restart",
  14.     author = "xNos",
  15.     description = "<- Description ->",
  16.     version = "1.0",
  17.     url = "<- URL ->"
  18. }
  19.  
  20. public OnPluginStart()
  21. {
  22.     HookEvent("round_start", Restart, EventHookMode_Post);
  23. }
  24.  
  25. public OnMapStart()
  26. {
  27.     new String:Map[32];
  28.     GetCurrentMap(Map, 32);
  29.    
  30.     if(StrContains( Map, "zm_", false ) != -1)
  31.     {
  32.         StartMap = true;
  33.     }
  34. }
  35.  
  36. public Action:Restart(Handle:event,const String:name[],bool:dontBroadcast)
  37. {
  38.     if(StartMap)
  39.     {
  40.         ServerCommand("mp_restartgame 1");
  41.         StartMap = false;
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement