Posts: 1,276
Threads: 6
Joined: Aug 2014
Quote:
Originally Posted by Mencent
Hello!
PHP Code:
new qstr[100];
format(qstr,sizeof qstr,"SELECT * FROM `players` WHERE `username`='%s';",plname);
mysql_tquery(handle,qstr,"OnLoadPlayer","i",playerid);//handle is the connection handle, please adjust this
//at the end of the script:
forward OnLoadPlayer(playerid);
public OnLoadPlayer(playerid)
{
if(!cache_num_rows())return 1;
gPlayerAccount[playerid] = 1;
return 1;
}
Notice:
- Mencent
|
Use this, but replace Username='%s' with Username='%e' and replace format with mysql_format(handle, qstr