Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerConnect(playerid)
- {
- DeletePVar(playerid, "BoomboxObject"); DeletePVar(playerid, "BoomboxURL");
- DeletePVar(playerid, "bposX"); DeletePVar(playerid, "bposY"); DeletePVar(playerid, "bposZ"); DeletePVar(playerid, "bboxareaid");
- if(IsValidDynamicObject(GetPVarInt(playerid, "BoomboxObject"))) DestroyDynamicObject(GetPVarInt(playerid, "BoomboxObject"));
- new IP[30], str[300], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerIp(playerid, IP, sizeof(IP));
- if(!strcmp(IP, "127.0.0.1"))
- {
- format(str, 230, ""ZUTA"%s "ZUTA"je usao na server "CRVENA"Drzava: "BIJELA"kucni || "CRVENA"IP Adress: "BIJELA"%d", pName, IP);
- Adminp(GetPlayerColor(playerid), str);
- }
- else
- {
- format(str, sizeof(str),"api.ipinfodb.com/v3/ip-country/?key="APIKEY"&ip=%s", IP);
- HTTP(playerid, HTTP_GET, str, "", "GetPlayerCountry");
- }
- ////////////////////////////////////////////////////////////////////////////
- ResetPlayer(playerid);
- /////////////////////////////Poruke pri konektu na server///////////////////
- SendClientMessage(playerid, 0x21DD00FF, "[LE:RPG] "BIJELA"Ocitavanje Servera, Sacekajte malo. ");
- ////////////////////////////////////////////////////////////////////////////
- new banfile[100]; format(banfile,sizeof(banfile),BAN_FOLDER,GetName(playerid));
- new ip[64];
- new banipfile[100]; format(banipfile,sizeof(banipfile),BANIP_FOLDER,GetPlayerIp(playerid,ip,50));
- if(fexist(banfile))
- {
- StatusKonekta(playerid, 1);
- return 1;
- }
- /////////////////////////////////////////////////////////////////////////////////////////
- if(fexist(Korisnici(playerid)))
- {
- INI_ParseFile(Korisnici(playerid), "LoadUser", .bExtra = true, .extra = playerid);
- SetTimerEx( "Login", 100, false, "d", playerid ); // ovo
- }
- else
- {
- if(!ProvjeraRPImena(playerid))
- {
- StatusKonekta(playerid, 2);
- return 1;
- }
- //SpawnPlayer( playerid );
- LogRegTimer[playerid] = SetTimerEx( "LogReg", 1000, false, "d", playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment