Check last 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 last pickup (
/showthread.php?tid=296730)
Check last pickup -
Admigo - 12.11.2011
Heey all,
How can i check the last pickup for some time?
Example: if player enters a pickup he can use a command and if the player leaves it he can use the command without entering the pickup for a time.
Variable will not working for this. Its needs to be on a other way.(pvarint or something)
Thanks admigo
Re: Check last pickup -
Pharrel - 12.11.2011
pawn Код:
//top of script
new LastPickup[MAX_PLAYERS];
//public OnPlayerPickupPickup(playerid, pickupid)
//{
//do whatever you want
LastPickup[playerid] = pickupid;
SetTimerEx("ResetLastPickup", /*time*/, false, "i", playerid);
//}
forward public ResetLastPickup(playerid);
public ResetLastPickup(playerid) return LastPickup[playerid] = -1,1;
i cant see why regular variables cant be used in this...
Re: Check last pickup -
Admigo - 12.11.2011
I just have problem with my robhouse command. I want to make a houserobbery if player is in house but all time its if player is in pickup and i dont know how i can detect the playerid,only its detects the owner in pickup