Add each time +1 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Add each time +1 (
/showthread.php?tid=445635)
Add each time +1 -
jordyvc - 22.06.2013
Hey,
I have something like this:
Quote:
CMD:work(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 250.0, 1067.5548,2092.2280,10.8203))
{
SendClientMessage(playerid, COLOR_WHITE, "[>>>] You are working in this factory, you earned one menpower point.");
INI_WriteInt(FILE, "MP", ++);
} else {
SendClientMessage(playerid, COLOR_WHITE, "{FFAAAA}[error]{FFFFFF}You are not near any factory!");
}
return 1;
}
|
I want that when some one is using /work in that range of point, the file is updating MP with +1.
But it isn't saving at the money, the counter is still standing on 0..
Thanks in advance!
Regards,
Jordyvc
Re: Add each time +1 -
SuperViper - 22.06.2013
Next time post in this section:
http://forum.sa-mp.com/forumdisplay.php?f=12
You need to retrieve the value first and then add 1 to it and store it.