Getting the players pickup, outside of onplayerpickuppickup - 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: Getting the players pickup, outside of onplayerpickuppickup (
/showthread.php?tid=367462)
Getting the players pickup, outside of onplayerpickuppickup -
Jstylezzz - 10.08.2012
Hi everyone,
I have a little problem here..
I am changing my script's pickups, and i'm making it with onplayerkeystatechange and pressing space to use the pickup, i think you get me.
well anyways, the problem is, that i don't know how to get the player's pickup, outside of the onplayerpickupickup callback.
Is there anyone who heard of something, a stock function perhaps, that does this?
I hope someone can help me.
Thanks in advance
Re: Getting the players pickup, outside of onplayerpickuppickup -
SnG.Scot_MisCuDI - 10.08.2012
IsPlayerInRangeOfPoint ?
Re: Getting the players pickup, outside of onplayerpickuppickup -
Ballu Miaa - 10.08.2012
You can make something like:
When the players picks up the pickid , Make a new array and set it to 1. Check for YourButton location , array which is 1 or not. If the key is is pressed and the player is on pickup (array==1) and IsPlayerInRangeOfPoint also return 1 then it will show the command.
Re: Getting the players pickup, outside of onplayerpickuppickup -
Jstylezzz - 10.08.2012
nvm, got it, and i think you guys are going to LOL...
i just added a variable, PickupNumber[MAX_PLAYERS]; , and under onplayerpickuppickup, i added PickupNumber[playerid] = pickupid;
i placed PickupNumber[playerid] in my code, and it works..