09.06.2017, 07:37
There shouldn't be an error on that line as far as I'm concerned. Show the lines above and below that one if you can.
You'll notice that in the GetCherried function, at the bottom there is another SetTimerEx line. This calls the function again instead of having it repeat, and it saves you having to save the timer ID as well. This isn't necessary but I'm a minimalist. There is also a variable 'CherryCount' which keeps track of how many times the function GetCherried has been called, and once it has been executed 3 times it deletes the objects and stops the timer from being called again.
You'll notice that in the GetCherried function, at the bottom there is another SetTimerEx line. This calls the function again instead of having it repeat, and it saves you having to save the timer ID as well. This isn't necessary but I'm a minimalist. There is also a variable 'CherryCount' which keeps track of how many times the function GetCherried has been called, and once it has been executed 3 times it deletes the objects and stops the timer from being called again.
PHP код:
if(!IsPlayerConnected(playerid) || ++CherryCount[playerid] > 3)

