Check if player is in a pickup - 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: Check if player is in a pickup (
/showthread.php?tid=310508)
Check if player is in a pickup -
LiamM - 12.01.2012
I'm working on a command just now that can only be typed if your in a pickup, is there a way to do if(IsPlayerInPickup or anything
If not I take it I'll just have to get the coords of the pickup and do a 'IsPlayerInRangeOfPoint'?
Re: Check if player is in a pickup -
Jakku - 12.01.2012
Just use IsPlayerInRangeOfPoint.
Re: Check if player is in a pickup -
Babul - 12.01.2012
when you enter the pickup, set a variable containing the actual GetTickCount(), and when the command gets called, compare the stored ticks with the actual ticks: if GetTickCount()-StoredTicks[playerid]<3000, then perform the command, else abort.