[HELP]Variable, MySQL. - 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]Variable, MySQL. (
/showthread.php?tid=307055)
[HELP]Variable, MySQL. -
[DOG]irinel1996 - 28.12.2011
Hi!
I'm new in MySQL and, I have a little doubt. Well...
I want to save the kills, so... Is correct this way?
pawn Код:
new Kills[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
//etc...
new query[128];
Kills[killerid]++;
format(query, sizeof(query), "UPDATE users SET kills=%d WHERE user='%s'",Kills[killerid],GetName(killerid));
mysql_query(query);
return 1;
}
I don't know if this is the correct way, so I want some help.

Best regards!