04.09.2017, 07:16
PHP код:
const MAX_COUNTRY_NAME = 45;
native GetCountryName(const ipaddress[], country[], size = sizeof country);
GetPlayerCountryName(playerid)
{
new ip[34], country[MAX_COUNTRY_NAME];
GetPlayerIp(playerid, ip, sizeof(ip));
new ret = GetCountryName(ip, country, sizeof(country));
if(!ret)
format(country, sizeof(country), "Private IP");
return country;
}
PHP код:
format(tmp, sizeof(tmp), "{FFFFFF}IP: {00FF00}%s {FFFFFF} || {FFFFFF}Country: {00FF00}%s\n", dini_Get(file,"IP"), GetPlayerCountryName(dini_Get(file,"IP"))); strcat(string, tmp);
Код:
D:\Data\SAMP Servers\SATDM\Gamemodes\SATDM~Beta.pwn(20949) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.