PDA

View Full Version : Pickup Help


Dr
04/04/2012, 02:26 AM
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
new file[256];
dini_IntSet(file, "Money", PlayerInfo[playerid][pMoney] += 60);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
DestroyPickup(pickupid);
return 1;
}

But the pickup isnt destroyed? Why?

DeathTone
04/04/2012, 02:27 AM
I think you gotta use

DestroyDynamicPickup(pickupid);

FalconX
04/04/2012, 02:28 AM
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
new file[256];
dini_IntSet(file, "Money", PlayerInfo[playerid][pMoney] += 60);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
DestroyPickup(pickupid);
return 1;
}

But the pickup isnt destroyed? Why?

because if you are using the streamer plugin and including it in your gamemode or filterscript you have to use the following function rather then using the default PickUp Destroying function.

native DestroyDynamicPickup(pickupid);

-FalconX