25.05.2009, 00:43
[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
Any comment,everyone can.
So
[Discuss]
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;
}
So
[Discuss]