/viewaliases - Help Please.
#10

Quote:
Originally Posted by GamingTurf
Посмотреть сообщение
while(mysql_fetch_row(query))
{
format(msg,sizeof(msg),"%s\n",namefound);
}
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, title, msg, "Select", "Back");


Edit that to your needs. It will display all users with 'LIKE' or 'EQUAL' to the IP, and list in the dialog.

Obviously you need to define all the other stuff.
Alright, I actually have one more question.

I'm trying to figure out how I would apply your given code to my script;
I'm not exactly sure what to do with while(mysql_fetch_row(query)).

Would I put the query into the brackets, or would I apply the query to a string, and put the string in there? Or does it even matter?

In any case, in trying to do this, I came up with this. Please provide some insight as to whether this is correct or not. Thanks!

pawn Код:
format(queryString, sizeof(queryString), "SELECT `playerName` FROM `playerAccounts` WHERE `playerIP` = '%s'", playerVariables[targetid][pConnectionIP]);
        while(mysql_fetch_row(queryString)) {
            format(string, sizeof(string), "%s", namefound);
        }
And if that is correct- what would I enter for the variable, where namefound is? I don't see the name, if it is found, being applied to a variable, and I'm unsure where to do that.
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)