Quote:
Originally Posted by Konstantinos
If you are about to update kills/deaths in OnPlayerDeath, then don't use variables just for getting the increased value. And why would you execute a query if the killer is not valid?
pawn Код:
new query[52];
if (killerid != INVALID_PLAYER_ID) { mysql_format(mysql, query, sizeof(query), "UPDATE players SET Kills=Kills+1 WHERE ID=%d", pInfo[killerid][ID]); mysql_pquery(mysql, query, "", ""); }
mysql_format(mysql, query, sizeof(query), "UPDATE players SET Deaths=Deaths+1 WHERE ID=%d", pInfo[playerid][ID]); mysql_pquery(mysql, query, "", "");
|
'And why would you execute a query if the killer is not valid?' I am not. Already used in my GM!
So this will not make server crash?