Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <PTaH>
- public Plugin myinfo =
- {
- name = "Pre Connect Reservedslots",
- author = "Pheonix (˙·٠●Феникс●٠·˙)",
- version = "1.0",
- url = "http://www.hlmod.ru/ http://zizt.ru/"
- };
- public Action OnClientPreConnect(const char[] sName, const char[] sPassword, const char[] ip, const char[] steamID, char rejectReason[512])
- {
- if(!(GetClientCount(false) < GetMaxHumanPlayers()-1))
- {
- if(FindAdminByIdentity(AUTHMETHOD_STEAM, steamID) != INVALID_ADMIN_ID)
- {
- int cl;
- float t, bt;
- for (int u = 1; u <= MaxClients; u++) if(IsClientInGame(u) && !GetUserFlagBits(u))
- {
- if(GetClientTeam(u) == 1)
- {
- KickClient(u, "Ocвoбoждeниe мecтa для ADM или VIP");
- return Plugin_Continue;
- }
- bt = GetClientTime(u);
- if(bt < t)
- {
- cl = u;
- t = bt;
- }
- }
- KickClient(cl, "Ocвoбoждeниe мecтa для ADM или VIP");
- return Plugin_Continue;
- }
- else
- {
- for (int u = 1; u <= MaxClients; u++) if(IsClientInGame(u) && !GetUserFlagBits(u))
- {
- if(GetClientTeam(u) == 1)
- {
- KickClient(u, "Ocвoбoждeниe мecтa для игрокa");
- return Plugin_Continue;
- }
- }
- }
- rejectReason = "Рeзeвный cлoт тoлькo для ADM и VIP";
- return Plugin_Handled;
- }
- return Plugin_Continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement