13.10.2012, 13:03
Hey I've been trying to figure out a way to do a one time mysql update of a certain column once a player reaches a score of 100 after 100 I don't want it updating into mysql anymore . I've tried putting it under onplayerupdate but it spams the chat window because I have it do a sendclientmessage.
Код:
new string[128],days; if(GetPlayerScore(playerid) == 100) { CheckMySQL(); format(string, sizeof(string), "UPDATE users SET PrivilegedExpiry=UNIX_TIMESTAMP()+%d*%d WHERE `Name`='%s'",1387584000, days, UserStats[playerid][Name]); mysql_query(string); SendClientMessage(playerid, 0xFF00FFFF, "You Have Been Granted Privileged Player Status."); UserStats[playerid][PrivilegedPlayer] = 1; }