24.07.2010, 11:41
Well guys, I made a textdraw on player death.
But I want it to dissapear in 2 seconds.
but it doesn't dissapear.
It stays forever. :O
please help
But I want it to dissapear in 2 seconds.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[286];
format(string,sizeof(string),"You killed %s",playername[playerid]);
killdraw = TextDrawCreate(255,45,string);
TextDrawSetOutline(killdraw,1);
TextDrawBackgroundColor(killdraw,COLOR_VIOLETRED);
TextDrawShowForPlayer(playerid,killdraw);
TextDrawTextSize(killdraw,10,10);
TextDrawSetShadow(killdraw,10);
kills[killerid] ++;
deaths[playerid] ++;
SetTimer("killtimer",2000,true);
return 1;
}
pawn Код:
public killtimer(playerid)
{
TextDrawHideForPlayer(playerid,killdraw);
return 1;
}
It stays forever. :O
please help