Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerConnect(playerid)
- {
- new string[128];
- new string2[128];
- new plname[MAX_PLAYER_NAME];
- new playersip[64];
- new bancheck[64];
- new ConnIP[16];
- new msg2[128];
- new y, m, d;
- new h,mi,s;
- getdate(y,m,d);
- gettime(h,mi,s);
- GetPlayerIp(playerid,ConnIP,16);
- GetPlayerName(playerid, plname, sizeof(plname));
- GetPlayerIp(playerid,playersip,sizeof(playersip));
- new namestring = strfind(plname, "_", true);
- format(string, sizeof(string),"%s",playersip);
- gPlayerAnimLibsPreloaded[playerid] = 0;
- for(new td; td < 17; td++)
- {
- TextDrawHideForPlayer(playerid, UvodTD[td]);
- }
- if(IsPlayerNPC(playerid))
- {
- new server_IP[16];
- format(server_IP, 16, "127.0.0.1");
- if(strcmp(ConnIP,server_IP,true) != 0) {
- Ban(playerid); // Ban is the safest thing here, as if you kick, they can still flood you with endless connections
- return 0;
- }
- SpawnPlayer(playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement