[SOLVED]to fix pickup bug - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]to fix pickup bug (
/showthread.php?tid=79034)
[SOLVED]to fix pickup bug -
yezizhu - 25.05.2009
[Bug]
We have noticed that when player enters a pickup,OnPlayerPickPickup get called,but pickupid is errorsometime.
[my Mind]
Since pickup bug was found,I consider to solve it by PAWN.Now,I come across an idea...I hardly have any time to write code cuz of College/University Entrance Examination.
[my Solution]
Use global variables to store pickupid,pickupcoord.
When OnPlayerPickPickup get called,fix pickupid by using PlayerToPoint/isPlayerInBox with pickups current coord.
(If you wanna to complete it,please release the code^^ }
eg
pawn Код:
fix_OnPlayerPickPickup(playerid){
for(new i;i<MAX_FIX_PICKUP;i++){
if(PlayerToPoint(playerid,5,x[i],y[i],z[i]) return i;
return INVALID_PICKUP_ID;
}
public OnPlayerPickPickup(playerid,pickupid){
pickupid = fix_OnPlayerPickPickup(playerid);
return true;
}
Any comment,everyone can.
So
[Discuss]
Re: [DISCUSSION]to fix pickup bug -
member - 25.05.2009
I think this has already been attempted by using PlayerToPoint. I'll have a look somewhere and get back when i find it.
EDIT: Here it is:
http://forum.sa-mp.com/index.php?topic=69320.0 - KANiS6111
Might not be exactly the same, but i think it's similar to what you were suggesting.
Re: [DISCUSSION]to fix pickup bug -
yezizhu - 25.05.2009
They use timer...?
Re: [DISCUSSION]to fix pickup bug -
yezizhu - 25.05.2009
Yell that's what im thinking about^^
That post should be sticked^^
Thx