Mysql Non_Exist account loads data? - 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: Mysql Non_Exist account loads data? (
/showthread.php?tid=455443)
Mysql Non_Exist account loads data? -
Admigo - 01.08.2013
Hi all,
I have a problem with my account exist.
When this is getting called and someone didnt have an account(player is not in mysqldatabase) a random clandata will be loaded.
So sometimes when i player is on the server he is loading as player in a clan but he/she is not in any clan.
pawn Код:
ExistAccount(playerid);//onplayerconnect
stock ExistAccount(playerid)
{
new query[128];
format(query, sizeof(query), "SELECT * FROM `"#MYSQL_ACCOUNT_TABLE5"` WHERE `PlayerName` = '%s'", GetPlayeridName(playerid));
if(mysql_ping(gSQL))
{
mysql_query(query, _THREAD_ACCOUNT_EXIST2, playerid, gSQL);
}
}
case _THREAD_ACCOUNT_EXIST ://Query
{
mysql_store_result();
if(mysql_num_rows(gSQL) > 0)
{
LoadPlayer3(extraid);//loading the clan data if the player account exist but its loading it also for players who not is in a clan(Player dont exist in DB)
}
mysql_free_result();
}
How to fix this?
Admigo
Re: Mysql Non_Exist account loads data? -
Admigo - 03.08.2013
Anyone?