14.12.2014, 19:36
Hello,
im Having a Problem With Creating Gift Box's OnPlayerDeath.
ok im creating pickups onplayerdeath the first pickup works correect.
when i kill a guy a pickup appears on his location where he died. and i can pick it..
[PROBLEM]: when i kill a guy a Pickup Appears On His Location Where he Died. and im leaving his pickup im not picking it. and when i kill a guy again both pickups got bugged. both can't be picked
HERE IS MY CODE:
On Top
Under OnPlayerDeath( ... )
im Having a Problem With Creating Gift Box's OnPlayerDeath.
ok im creating pickups onplayerdeath the first pickup works correect.
when i kill a guy a pickup appears on his location where he died. and i can pick it..
[PROBLEM]: when i kill a guy a Pickup Appears On His Location Where he Died. and im leaving his pickup im not picking it. and when i kill a guy again both pickups got bugged. both can't be picked
HERE IS MY CODE:
On Top
PHP код:
new GiftPickup[MAX_PLAYERS];
PHP код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
GiftPickup[playerid] = CreatePickup(19054,8,X,Y,Z, 0);
PHP код:
Under OnPlayerPickupPickup( ... )
if(pickupid == GiftPickup[playerid])
{
//gifts
//merry xmas
DestroyPickup(GiftPickup);
}