[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


Messages In This Thread
[SOLVED]to fix pickup bug - by yezizhu - 25.05.2009, 00:43
Re: [DISCUSSION]to fix pickup bug - by member - 25.05.2009, 08:37
Re: [DISCUSSION]to fix pickup bug - by yezizhu - 25.05.2009, 08:47
Re: [DISCUSSION]to fix pickup bug - by yezizhu - 25.05.2009, 08:54

Forum Jump:


Users browsing this thread: 1 Guest(s)