26.08.2015, 18:34
Hey guys,
I've made a textdraw but it do shows the nessage but never disappeares ..
I've made a textdraw but it do shows the nessage but never disappeares ..
public OnPlayerDeath(playerid, killerid, reason) { #pragma unused TimeM #pragma unused TimeS #pragma unused Time SendClientMessage(playerid, COLOR_YELLOW, "GREAT,You are now on death list"); deathText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "HA Ha, You got OWNED :D"); PlayerTextDrawShow(playerid, deathText[playerid]); Time = SetTimer("UpdateTime", 1000, true); SendDeathMessage(killerid, playerid, reason); return 1; }
forward TimeTextForPlayer(playerid, Text:text, time); public TimeTextForPlayer(playerid, Text:text, time) { TextDrawShowForPlayer(playerid, text); SetTimerEx("DestroyTextTimerForPlayer", time, 0, "di", playerid, _:text); } public DestroyTextTimerForPlayer(playerid, Text:text) { TextDrawHideForPlayer(playerid, text); } Example: TimeTextForPlayer(playerid, MY_TEXTDRAW, 3000); //3000 ms = 3 seconds