Hello i am trying to script a cmd to check the offline account ips which like the ip
Код:
CMD:oipcheck(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
return 1;
}
new query[128], name[MAX_PLAYER_NAME];
if(sscanf(params, "s", name)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /oipcheck [name]");
new tmpName[24];
mysql_escape_string(name, tmpName, MainPipeline);
format(query, sizeof(query), "SELECT `Username`, `IP` FROM `accounts` WHERE `Username` = '%s' AND `AdminLevel` <= %d", tmpName, PlayerInfo[playerid][pAdmin]);
mysql_function_query(MainPipeline, query, true, "OnIPCheck", "i", playerid);
return 1;
}