[SOLVED]to fix pickup bug
#1

[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]
Reply
#2

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.
Reply
#3

They use timer...?
Reply
#4

Yell that's what im thinking about^^
That post should be sticked^^
Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)