Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. #include <PTaH>
  2.  
  3. public Plugin myinfo =
  4. {
  5. name = "Pre Connect Reservedslots",
  6. author = "Pheonix (˙·٠●Феникс●٠·˙)",
  7. version = "1.0",
  8. url = "http://www.hlmod.ru/ http://zizt.ru/"
  9. };
  10.  
  11. public Action OnClientPreConnect(const char[] sName, const char[] sPassword, const char[] ip, const char[] steamID, char rejectReason[512])
  12. {
  13. if(!(GetClientCount(false) < GetMaxHumanPlayers()-1))
  14. {
  15. if(FindAdminByIdentity(AUTHMETHOD_STEAM, steamID) != INVALID_ADMIN_ID)
  16. {
  17. int cl;
  18. float t, bt;
  19. for (int u = 1; u <= MaxClients; u++) if(IsClientInGame(u) && !GetUserFlagBits(u))
  20. {
  21. if(GetClientTeam(u) == 1)
  22. {
  23. KickClient(u, "Ocвoбoждeниe мecтa для ADM или VIP");
  24. return Plugin_Continue;
  25. }
  26. bt = GetClientTime(u);
  27. if(bt < t)
  28. {
  29. cl = u;
  30. t = bt;
  31. }
  32. }
  33. KickClient(cl, "Ocвoбoждeниe мecтa для ADM или VIP");
  34. return Plugin_Continue;
  35. }
  36. else
  37. {
  38. for (int u = 1; u <= MaxClients; u++) if(IsClientInGame(u) && !GetUserFlagBits(u))
  39. {
  40. if(GetClientTeam(u) == 1)
  41. {
  42. KickClient(u, "Ocвoбoждeниe мecтa для игрокa");
  43. return Plugin_Continue;
  44. }
  45. }
  46. }
  47. rejectReason = "Рeзeвный cлoт тoлькo для ADM и VIP";
  48. return Plugin_Handled;
  49. }
  50. return Plugin_Continue;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement