SA-MP Forums Archive
[HELP]MySQL load & set - 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: [HELP]MySQL load & set (/showthread.php?tid=314137)



[HELP]MySQL load & set - Fico62 - 28.01.2012

if(mysql_fetch_row(line))
{
new data[3][55];
new data2[7];
sscanf(line, "p<|>s[50]s[300]dddds[50]ds[100]", data[0], largestring, data2[0], data2[1], data2[2], data2[3], data[2], data2[4], estring);
stringempty(estring);
stringempty(largestring);
SetPVarInt(playerid, "Kills", data2[0]);
SetPVarInt(playerid, "Logged", 1);
SetPVarInt(playerid, "Deaths", data2[1]);
SetPlayerScore(playerid, data2[2]);
GivePlayerMoney(playerid, data2[3]);
SetPVarInt(playerid, "AdminLevel", data2[4]);
SendClientMessage(playerid, 0x0000D9AA, "Logirani ste!");
mysql_free_result();
GetPlayerIp(playerid, PIP, 1;
format(Query, sizeof(Query), "UPDATE `playerinfo` SET IP = '%s' WHERE user='%s'", PIP, escpname(playerid));
mysql_query(Query);
}
Here i got AdminLevel it's not last table after it i got table "leader" and "member"
I want to set leader and member like a AdminLevel in Pvar int ...Can you help me ? I don't know to work with sscanf?


Re: [HELP]MySQL load & set - jamesbond007 - 28.01.2012

what do u mean... explain more .. and use [pawn] [/ pawn] tags next time pl0x


AW: [HELP]MySQL load & set - Fico62 - 28.01.2012

here -
i want when player connect to server to SetPVar Int Member, leader, drzava and godine like he sets admin...but i don't know how to


AW: [HELP]MySQL load & set - Fico62 - 29.01.2012

BUMP i need help!


Re: [HELP]MySQL load & set - Konstantinos - 29.01.2012

I have never used MySQL, but Kills and Deaths/Score/Money etc.. are integer, aren't they?


AW: [HELP]MySQL load & set - Fico62 - 29.01.2012

i don't know i just want to load it by string help pls!


AW: [HELP]MySQL load & set - Fico62 - 30.01.2012

i fixed it
D
Lock here