15.12.2014, 06:37
pawn Код:
new GiftOwner[MAX_PICKUPS];
// OnGameModeInit
for(new i = 0; i < MAX_PICKUPS; i++)
{
GiftOwner[i] = INVALID_PLAYER_ID;
}
// OnPlayerDeath
if(killerid != INVALID_PLAYER_ID)
{
new pickupid = CreatePickup(19054,8,X,Y,Z, 0);
GiftOwner[pickupid] = killerid;
}
// OnPlayerPickupPickup
if(GiftOwner[pickupid] != INVALID_PLAYERID && GiftOwner[pickupid] == playerid)
{
// your code here
GiftOwner[pickupid] = INVALID_PLAYER_ID;
DestroyPickup(pickupid);
}