Textdraw only shows up one time but need to repeat
#1

Hello , i got a problem . So i made myself script when player enters wron command it will show the textdraw that command doesn't exist . So the problem is that it shows up only one time ex : i write /wrongcmd and it shows me that textdraw for 5 seconds but when i type another wrond cmd it doesn't show up .

All Code : (i'm using zcmd)

Код:
new Text:Textdraw2;
Код:
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
Код:
	Textdraw2 = TextDrawCreate(270.000091, 434.725921, "~w~ Jusu irasyta komanda ~r~nebuvo rasta !");
	TextDrawLetterSize(Textdraw2, 0.196333, 1.376000);
	TextDrawAlignment(Textdraw2, 1);
	TextDrawColor(Textdraw2, -1);
	TextDrawSetShadow(Textdraw2, 0);
	TextDrawSetOutline(Textdraw2, 1);
	TextDrawBackgroundColor(Textdraw2, 51);
	TextDrawFont(Textdraw2, 2);
	TextDrawSetProportional(Textdraw2, 1);
Код:
forward unknwmcmd(playerid);
public unknwmcmd(playerid)
{

    TextDrawDestroy(Textdraw2);
    return 1;
}
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, -1, "{3399FF}[Serveris] {FFFF00}Tokios Komandos Nera {3399FF}!");
    TextDrawShowForPlayer(playerid, Textdraw2);
    SetTimerEx("unknwmcmd", 5000, false, "i", playerid);
    return 1;
}
Reply
#2

this is right script --
Код:
forward unknwmcmd(playerid);
public unknwmcmd(playerid)
{

    TextDrawHideForPlayer(playerid, Textdraw2);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)