ARTIST_SAMP

Untitled

Apr 21st, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. // La public OnPlayerConnect(playerid)
  2.  
  3. new IP1[16],IP2[16];
  4. GetPlayerIp(playerid, IP1, sizeof(IP1));
  5. new ipcount = 0;
  6. for(new i=0; i<GetMaxPlayers(); i++)
  7. {
  8. if(playerid == i || !IsPlayerConnected(i)) continue;
  9. GetPlayerIp(i, IP2, sizeof(IP2));
  10. if(!strcmp(IP1, IP2, true))ipcount++;
  11. if(ipcount > 2)
  12. {
  13. SendClientMessage(playerid, CRED, "De pe o singura adresa IP nu pot fi mai mult de 2 conexiuni in acelasi timp.");
  14. Kick(playerid); // inlocuiesti cu variabila ce raspunde de kick in modul dumitale
  15. break;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment