Posts: 42
Threads: 14
Joined: Sep 2017
Reputation:
0
Sorry for bumping, And this textdraw isnt disappearing -_-
Posts: 204
Threads: 28
Joined: Apr 2016
Simply creating on it's right function and using a timer to destroy it and make sure you read this >
https://sampwiki.blast.hk/wiki/Textdraw
E.g code
PHP Code:
new Text:Unknow;
forward unkcmd(playerid);
public unkcmd(playerid)
{
TextDrawHideForPlayer(playerid, Unknow);
return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if (!success)
{
TextDrawShowForPlayer(playerid, Unknow);
SetTimerEx("unkcmd", 5000, false, "i", playerid);
}
return 1;
}
public OnGameModeInit()
{
Unknow = TextDrawCreate(318, 384, "Unknown Command");
TextDrawFont(Unknow , 1);
TextDrawLetterSize(Unknow , 0.6, 4.2);
TextDrawColor(Unknow , 0xFFFFFFFF);
TextDrawSetOutline(Unknow , 0);
TextDrawSetProportional(Unknow , 1);
TextDrawSetShadow(Unknow , 1);
return 1;
}