Quote:
Originally Posted by gurmani11
i did not test it with this [easy-mysql] but i think it must work,
PHP код:
native gpci (playerid, serial [], len); /// at top
enum sbAdmin
{
pGPCI[128]
};
new User[MAX_PLAYERS][sbAdmin];
stock GetPlayerGPCI(playerid)
{
new GPCI[128];
gpci(playerid, GPCI, 128);
return GPCI;
}
CMD:gpciscan(playerid,params[])
{
new target;
if(sscanf(params, "u", target)) return SendClientMessage(playerid,"/GPCIScan [ID]");
if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid,"Invalid Player id");
if(SQL::RowExistsEx(""PLAYERS_TABLE"", "username", GetName(target)))
{
new handle = SQL::OpenEx(SQL::READ, ""PLAYERS_TABLE"", "username", GetName(target));
SQL::ReadString(handle, "GPCI", User[target][pGPCI], 128);
SQL::Close(handle);
}
new string[250];
format(string,sizeof(string), "%s's GPCI - %s", GetName(target), User[target][pGPCI]);
SendClientMessage(playerid,-1,string);
return 1;
}
// SQL::WriteString(handle, "GPCI", GetPlayerGPCI(playerid)); //write it
|
Gpci will give a lot of false warnings, since it just get player's computer name for example my computer's name is Administrator if another guy there is another registered guy with the same computer name it will also print his account so it's not safe