Dio skripte: Dole sve
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): Dole
ZnaÄi, kad se konektam ovo bude dole na slicii
Ime IgraÄa: Escobar: Zemlja -
A ne piše iz koje države
piše samo koji ip
IP Addres: 127.0.0.1...
http://noobot.info/uploader/image.php?di=A6GG
Evo dijelovi kodova:
forward GetPlayerCountry(index, response_code, data[]);
public GetPlayerCountry(index, response_code, data[])
{
new buffer;
if(response_code == 200)
{
new str, strr, city, country, ippp, pName;
GetPlayerName(index, pName, sizeof(pName));
GetPlayerIp(index, ippp, 24);
format(buffer, sizeof(buffer), "%s", data);
strmid(str, buffer, 4, strlen(buffer)); // Cutting the 'OK' response...
strmid(city, str, strfind(str, ";", true) + 1, strfind(str, ";", true) + 3); // Getting City
strmid(country, str, strfind(str, ";", true) + 4, strlen(buffer)); // Getting Country
format(str, 256, "Ime igraca %s Zemlja - "CRVENA"%s", pName , country);
SendAdminMessage(0xFFFF80C8, str);
format(strr, 256, "IP Adress - "CRVENA"%s", ippp);
SendAdminMessage(0xFFFF80C8, strr);
}
else
{
new str, pName;
GetPlayerName(index, pName, sizeof(pName));
#if defined ALWAYS_RESPONSE
new IP;
GetPlayerIp(index, IP, sizeof(IP));
format(str, sizeof(str),"api.ipinfodb.com/v3/ip-country/?key="APIKEY"&ip=%s", IP);
HTTP(index, HTTP_GET, str, "", "GetPlayerCountry");
#else // Normal message, without country
format(str, 120, "%s {FAFAFA}je usao na server.", pName);
AdminGameMaster(GetPlayerColor(index), str);
#endif
}
}public OnPlayerConnect(playerid)
{
///pwarovi
SetPVarInt(playerid, "StatsPrikazan", 0);
///////////////////////////////////////
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 szFile, szLog, szIp, Year, Month, Day;
getdate(Year, Month, Day);
GetPlayerIp(playerid, szIp, charsmax(szIp));
format(szFile, charsmax(szFile), "logoviipadresa/IP Log_%02d%02d%d.log", Day, Month, Year);
format(szLog, charsmax(szLog), "Player Name: %s | IP: %s | Player ID: %s |", GetName(playerid), szIp,playerid );
Log(szFile, szLog);
new IP, str, pName;
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: "BELA"kucni || "CRVENA"IP Adress: "BELA"%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");
}Skripta nema ni errora ni warninga...
