Advertisement
Anime4000

Switch to Infected

Feb 7th, 2014
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. #define PLUGIN_VERSION "0.1"
  5.  
  6. public Plugin:myinfo =
  7. {
  8.     name = "[L4D2] Force to Infected",
  9.     author = "Me",
  10.     description = "As plugins name say",
  11.     version = PLUGIN_VERSION,
  12.     url = ""
  13. }
  14.  
  15. public bool:OnClientConnect(client, String:rejectmsg[], maxlen)
  16. {
  17.     CreateTimer(60.0, TimeSwitch, client);
  18.     return true;
  19. }
  20.  
  21. public Action:TimeSwitch(Handle:timer, any:client)
  22. {
  23.     if(IsClientInGame(client))
  24.     {
  25.         ClientCommand(client,3);
  26.     }
  27.     else if(IsClientConnected(client))
  28.     {
  29.         CreateTimer(60.0, TimeSwitch, client);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement