Problem Account - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem Account (
/showthread.php?tid=589703)
Problem Account -
r0bi - 21.09.2015
Hi. I'm trying to solve this problem since two days, but without result.
Let's describe it: At login, details from table are setted by id. For example, if my ID is 1, my money, level, adminlvl, etc are setted to 1. Is anyone who can help me?
PHP код:
new query[128];
format(query, sizeof(query),"SELECT * FROM User WHERE Nume = '%s'",GetName(playerid));
mysql_query(query);
mysql_store_result();
/*if(mysql_num_rows())
if(mysql_fetch_row_format(query,"|"))*/
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_row_format(query, "Id"); PlayerInfo[playerid][pSQID] = strval(query);
mysql_fetch_row_format(PlayerInfo[playerid][Nume], "Nume");
mysql_fetch_row_format(PlayerInfo[playerid][Pass], "Parola");
mysql_fetch_row_format(query, "Level"); PlayerInfo[playerid][Level] = strval(query); SetPlayerScore(playerid,PlayerInfo[playerid][Level]);
mysql_fetch_row_format(query, "Bani"); PlayerInfo[playerid][BaniReali] = strval(query); GivePlayerMoney(playerid, PlayerInfo[playerid][BaniReali]);
mysql_fetch_row_format(query, "AdminLevel"); PlayerInfo[playerid][Adminlevel] = strval(query);
mysql_fetch_row_format(query, "SetSpawn"); PlayerInfo[playerid][SetSpawn] = strval(query);
mysql_fetch_row_format(query, "Spovedit"); PlayerInfo[playerid][SpovImp] = strval(query);
}