13.08.2011, 12:41
pawn Код:
//at the top of the script
#define DEATH_TIMER 10000 // i seted it 10000 mileseconds (10 seconds) change it to the time you wish
new
DeathPickup[500];
//under OnPlayerDeath
new Float:dPos[3];
GetPlayerPos(playerid, dPos[0], dPos[1], dPos[2]);
DeathPickup[playerid] = CreatePickup(model, type, dPos[0], dPos[1], dPos[2], Virtualworld);
SetTimerEx("RemoveDeathPickup",DEATH_TIMER,0,"i",playerid);
//somewhere in your script
forward RemoveDeathPickup(playerid);
public RemoveDeathPickup(playerid)
{
DestroyPickup(DeathPickup[playerid]);
return 1;
}
EDIT: I changed the "1" on timer to "0" so the timer is not repeated"