PDA

View Full Version : [HELP]Variable, MySQL.


[DOG]irinel1996
29/12/2011, 12:49 AM
Hi!
I'm new in MySQL and, I have a little doubt. Well...
I want to save the kills, so... Is correct this way?

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! :D