Mysql Problem | Help Meee :( Helpp
#5

I had just finished an mysql login/register so here is what i used :
pawn Код:
new query[128];
new row[10];
/// -- ADMIN -- //
format(query, sizeof(query), "SELECT `AdminLevel` FROM `players` WHERE `id` = %d LIMIT 1", PlayerInfo[playerid][pSQLID]);
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(row);
PlayerInfo[playerid][AdminLevel] = strval(row);
/// -- Money -- ///
format(query, sizeof(query), "SELECT `Money` FROM `players` WHERE `id` = %d LIMIT 1", PlayerInfo[playerid][pSQLID]);
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(row);
PlayerInfo[playerid][Money] = strval(row);

///// ETC ETC /////
Also at the onplayerconnect
pawn Код:
new sqlaccountstatus = MySQLCheckAccount(plname);
PlayerInfo[playerid][pSQLID] = sqlaccountstatus;
i'm guessing that you already have the mysqlcheckaccount function .
Reply


Messages In This Thread
Mysql Problem | Help Meee :( Helpp - by Musty80 - 11.06.2010, 09:26
Re: Mysql Problem | Help Meee :( Helpp - by Carlton - 11.06.2010, 09:34
Re: Mysql Problem | Help Meee :( Helpp - by Musty80 - 11.06.2010, 09:52
Re: Mysql Problem | Help Meee :( Helpp - by Musty80 - 11.06.2010, 12:14
Re: Mysql Problem | Help Meee :( Helpp - by Dj_maryo1993 - 11.06.2010, 14:53
Re: Mysql Problem | Help Meee :( Helpp - by Musty80 - 12.06.2010, 20:17
Re: Mysql Problem | Help Meee :( Helpp - by Dj_maryo1993 - 13.06.2010, 15:35
Re: Mysql Problem | Help Meee :( Helpp - by Musty80 - 13.06.2010, 16:01
Re: Mysql Problem | Help Meee :( Helpp - by Dj_maryo1993 - 13.06.2010, 21:59
Re: Mysql Problem | Help Meee :( Helpp - by Aleksandar_Zivanovci - 13.06.2010, 22:49

Forum Jump:


Users browsing this thread: 2 Guest(s)