/viewaliases - Help Please.
#1

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;

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;
}
I can't figure out how to make it check if the other accounts have the same IP address.
Could somebody please help? Thanks!
Reply


Messages In This Thread
/viewaliases - Help Please. - by Eric - 18.01.2012, 20:34
Re: /viewaliases - Help Please. - by milanosie - 18.01.2012, 21:03
Re: /viewaliases - Help Please. - by Eric - 18.01.2012, 21:09
Re: /viewaliases - Help Please. - by milanosie - 18.01.2012, 21:24
Re: /viewaliases - Help Please. - by GamingTurf - 18.01.2012, 21:30
Re: /viewaliases - Help Please. - by Eric - 18.01.2012, 21:31
Re: /viewaliases - Help Please. - by milanosie - 18.01.2012, 21:33
Re: /viewaliases - Help Please. - by GamingTurf - 18.01.2012, 21:34
Re: /viewaliases - Help Please. - by Eric - 18.01.2012, 21:35
Re: /viewaliases - Help Please. - by Eric - 18.01.2012, 21:46

Forum Jump:


Users browsing this thread: 1 Guest(s)