Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new maxPlayers = GetMaxPlayers();
- static const AdminNick[21] = "Admin";
- new name[21], ip_adresa[16];
- for (new i=0; i< maxPlayers; i++)
- {
- if (IsPlayerConnected(i))
- {
- GetPlayerIp(i, ip_adresa, sizeof(ip_adresa));
- if (!strcmp(ip, ip_adresa, false)) //našli jsme hráče s danou ip, co se pokoušel přihlásit
- {
- GetPlayerName(i, name, sizeof(name));
- if (strcmp(name, AdminNick, false)) //když má jiný nick, než AdminNick
- {
- Kick(i);
- }
- break; //ukončíme smyčku, protože hráče s danou ip už jsme našli
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement