11.07.2014, 12:12
Hello i am trying to script a cmd to check the offline account ips which like the ip
i mean like /checkaccounts [ip]
will give all me accounts which its last ip = that ip which i wrote
i got an offline ip check with name
can any one help me to make one ?
i mean like /checkaccounts [ip]
will give all me accounts which its last ip = that ip which i wrote
i got an offline ip check with name
Код:
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; }