26.07.2014, 15:52
I'm making my own RP script, when a player types in the chat it displays a TextLabel above the players head.. however once 5000 ticks (5 seconds) passes it doesn't delete the textlabel?
Here is the code:
Here is the code:
Код:
public OnPlayerText(playerid, text[]) { new string[128]; format(string,sizeof(string),"%s: %s",RemoveUnderScore(playerid),text); ProxDetector(30,playerid,string,CHATFADE_1,CHATFADE_2,CHATFADE_3,CHATFADE_4,CHATFADE_5); { new Text3D:chatlabel = Create3DTextLabel(string,CHATFADE_1,0,0,0,30,GetPlayerVirtualWorld(playerid),0); Attach3DTextLabelToPlayer(chatlabel,playerid,0,0,0.7); SetTimer("Delete3DTextLabel(chatlabel)",5000,false); return 1; } }