SA-MP Forums Archive
Help with getplayerscore - 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 with getplayerscore (/showthread.php?tid=384801)



Help with getplayerscore - tippythop - 13.10.2012

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;
	}



Re: Help with getplayerscore - tippythop - 13.10.2012

really need some help