13.08.2011, 12:28
how do I bring up the icons after the death of the player as well?
http://oi54.tinypic.com/w0qjr7.jpg
http://oi54.tinypic.com/w0qjr7.jpg
//under OnPlayerDeath
new Float:dPos[3];
GetPlayerPos(playerid, dPos[0], dPos[1], dPos[2]);
CreatePickup(model, type, dPos[0], dPos[1], dPos[2], Virtualworld);
//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;
}