23.07.2013, 13:42
Код:
new PlayerText:__playerinfobox__; new bool:__playeralreadyinbox__[MAX_PLAYERS]; new __playerhidetimer__[MAX_PLAYERS]; stock MessageBox(playerid, time, text, title)//time in ms { if (__playeralreadyinbox__[playerid]) { // destroy old box // kill old timers PlayerTextDrawDestroy(playerid, __playerinfobox); KillTimer (__playerhidetimer__[playerid]); } __playeralreadyinbox__ [playerid] = true; // create here the player text, and save inside __playerinfobox__ __playerhidetimer__[playerid] = SetTimerEx("DestroyMessageBox", time, 0, "i", playerid);// if you want time in seconds, use time * 1000 } forward DestroyMessageBox(playerid); public DestroyMessageBox(playerid) { PlayerTextDrawDestroy(playerid, __playerinfobox); __playeralreadyinbox__ [playerid] = false; }
https://sampwiki.blast.hk/wiki/SetTimerEx
Player Textdraws:
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw