Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // La public OnPlayerConnect(playerid)
- new IP1[16],IP2[16];
- GetPlayerIp(playerid, IP1, sizeof(IP1));
- new ipcount = 0;
- for(new i=0; i<GetMaxPlayers(); i++)
- {
- if(playerid == i || !IsPlayerConnected(i)) continue;
- GetPlayerIp(i, IP2, sizeof(IP2));
- if(!strcmp(IP1, IP2, true))ipcount++;
- if(ipcount > 2)
- {
- SendClientMessage(playerid, CRED, "De pe o singura adresa IP nu pot fi mai mult de 2 conexiuni in acelasi timp.");
- Kick(playerid); // inlocuiesti cu variabila ce raspunde de kick in modul dumitale
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment