29.10.2013, 17:41
Hello
Because I find the SAMP pickup system quite annoying to work with (no offence) because the types are limited and none of the spawn types fit my needs I was trying to make a new custom pickup system.
So in this system I could create pickups with custom respawn time or respawn types.
The thing is, to do that I need to check whether a player is near the pickup or not, if he is then OnPlayerPickupNewPickupType should be called.
I tried making a timer that would run every quarter of a second, however it was to slow to handle me rushing through one in a vehicle. So the only way of doing this would be using OnPlayerUpdate.
But since that callback is called so frequently would it be a good idea to loop through all my created pickups and check if the player is near one?
Because I find the SAMP pickup system quite annoying to work with (no offence) because the types are limited and none of the spawn types fit my needs I was trying to make a new custom pickup system.
So in this system I could create pickups with custom respawn time or respawn types.
The thing is, to do that I need to check whether a player is near the pickup or not, if he is then OnPlayerPickupNewPickupType should be called.
I tried making a timer that would run every quarter of a second, however it was to slow to handle me rushing through one in a vehicle. So the only way of doing this would be using OnPlayerUpdate.
But since that callback is called so frequently would it be a good idea to loop through all my created pickups and check if the player is near one?