Checking if account exists
#10

Well, I think your stock/check is wrong.

This is how my working code looks like

pawn Код:
// change name cmd
mysql_format(MySQLHandle, Query, sizeof(Query), "SELECT * FROM users WHERE PlayerName = '%s' LIMIT 1", newname);
    mysql_tquery(MySQLHandle, Query, "OnAccountChangeName", "iis", playerid,id, newname);

forward OnAccountChangeName(playerid, id, newname[]);
public OnAccountChangeName(playerid, id, newname[])
{
    if(cache_num_rows()) return SendClientMessage(playerid, COLOR_ERROR, "This name is in use!");
    // ....
    return 1;
}
Reply


Messages In This Thread
Checking if account exists - by Luis- - 09.02.2015, 18:18
Re: Checking if account exists - by HazardouS - 09.02.2015, 18:24
Re: Checking if account exists - by Luis- - 09.02.2015, 18:32
Re: Checking if account exists - by Sawalha - 09.02.2015, 18:33
Re: Checking if account exists - by Luis- - 09.02.2015, 18:41
Re: Checking if account exists - by Sawalha - 09.02.2015, 18:45
Re: Checking if account exists - by Luis- - 09.02.2015, 18:47
Re: Checking if account exists - by Sime30 - 09.02.2015, 18:48
Re: Checking if account exists - by HazardouS - 09.02.2015, 18:53
Re: Checking if account exists - by Sime30 - 09.02.2015, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)