Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. public OnPlayerConnect(playerid)
  2. {
  3.  
  4. new string[128];
  5. new string2[128];
  6. new plname[MAX_PLAYER_NAME];
  7. new playersip[64];
  8. new bancheck[64];
  9. new ConnIP[16];
  10. new msg2[128];
  11. new y, m, d;
  12. new h,mi,s;
  13. getdate(y,m,d);
  14. gettime(h,mi,s);
  15. GetPlayerIp(playerid,ConnIP,16);
  16. GetPlayerName(playerid, plname, sizeof(plname));
  17. GetPlayerIp(playerid,playersip,sizeof(playersip));
  18. new namestring = strfind(plname, "_", true);
  19. format(string, sizeof(string),"%s",playersip);
  20. gPlayerAnimLibsPreloaded[playerid] = 0;
  21. for(new td; td < 17; td++)
  22. {
  23. TextDrawHideForPlayer(playerid, UvodTD[td]);
  24. }
  25. if(IsPlayerNPC(playerid))
  26. {
  27. new server_IP[16];
  28. format(server_IP, 16, "127.0.0.1");
  29.  
  30. if(strcmp(ConnIP,server_IP,true) != 0) {
  31. Ban(playerid); // Ban is the safest thing here, as if you kick, they can still flood you with endless connections
  32. return 0;
  33. }
  34. SpawnPlayer(playerid);
  35. return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement