27.03.2016, 03:20
Hi! I create this text draw, it's showing the text draw, but my problem is the text draw is not hiding / removed after 1.5 secs. Please Help. Thank you!
Under OnPlayerConnect:
Under OnPlayerDisconnect:
PHP код:
new Text:UnknownCommand;
PHP код:
UnknownCommand = TextDrawCreate(323.799999, 432, "Unknown Command!");
TextDrawLetterSize(UnknownCommand, 0.2, 0.999);
TextDrawAlignment(UnknownCommand, 2);
TextDrawColor(UnknownCommand, -1);
TextDrawSetOutline(UnknownCommand, 1);
TextDrawFont(UnknownCommand, 2);
TextDrawUseBox(UnknownCommand, 1);
TextDrawBoxColor(UnknownCommand, 0x00000088);
SetTimerEx("HideTextDraw", 1500, false, "i", playerid);
PHP код:
TextDrawDestroy(UnknownCommand);
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
return TextDrawShowForPlayer(playerid, UnknownCommand);
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
return TextDrawShowForPlayer(playerid, UnknownCommand);
}
PHP код:
forward HideTextDraw(playerid);
public HideTextDraw(playerid)
{
TextDrawHideForPlayer(playerid, UnknownCommand);
return 1;
}