21.08.2011, 21:19
I made it so when a player spawns a textdraw with the number of the player his/her deaths appears.
It should dissapear when the player dies and it should re-appear when the player spawns again ( so it updates )
However, the textdraw does not dissapear and it'll just create a new one over the old one.
OnPlayerSpawn
Works fine
OnPlayerDeath
Nothing happens when this gets called.
I hope somebody can help me ;d
Thanks,
Shred.
It should dissapear when the player dies and it should re-appear when the player spawns again ( so it updates )
However, the textdraw does not dissapear and it'll just create a new one over the old one.
OnPlayerSpawn
Code:
new deathstring[30]; format(deathstring, sizeof(deathstring), "Deaths: %d", PlayerInfo[playerid][pDeaths]); Textdraw7[playerid] = TextDrawCreate(500.000000, 142.000000, deathstring); TextDrawBackgroundColor(Textdraw7[playerid], 255); TextDrawFont(Textdraw7[playerid], 1); TextDrawLetterSize(Textdraw7[playerid], 0.490000, 2.000000); TextDrawColor(Textdraw7[playerid], -16776961); TextDrawSetOutline(Textdraw7[playerid], 0); TextDrawSetProportional(Textdraw7[playerid], 1); TextDrawSetShadow(Textdraw7[playerid], 1); TextDrawShowForPlayer(playerid, Textdraw7[playerid]);
OnPlayerDeath
Code:
TextDrawHideForPlayer(playerid, Textdraw7[playerid]); TextDrawDestroy(Textdraw7[playerid]);
I hope somebody can help me ;d
Thanks,
Shred.