18.01.2012, 20:34
Heya' guys.
I'm attempting to make a command that will get the players IP from the SQL, and compare it to all of the other accounts IP addresses.
If there is more then one account with the same IP address, it will relay the account names to the administrator that typed the command.
Here is what I have so far;
I can't figure out how to make it check if the other accounts have the same IP address.
Could somebody please help? Thanks!
I'm attempting to make a command that will get the players IP from the SQL, and compare it to all of the other accounts IP addresses.
If there is more then one account with the same IP address, it will relay the account names to the administrator that typed the command.
Here is what I have so far;
pawn Код:
CMD:viewaliases(playerid,params[]) {
if(playerVariables[playerid][pAdminLevel] >= 3) {
new targetid,
string[128];
if(sscanf(params, "u", targetid))
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/viewaliases [playerid]");
format(string, sizeof(string), "Players IP: %s", playerVariables[targetid][pConnectionIP]);
SendClientMessage(playerid, COLOR_GREY, string);
mysql_query("SELECT playerIP FROM `playerAccounts` WHERE playerID='%d'", playerVariables[playerid][pInternalID]);
}
else {
return SendClientMessage(playerid, COLOR_GREY, "You are not a senior administrator.");
}
return 1;
}
Could somebody please help? Thanks!