24.09.2012, 15:54
How can I make a textdraw which will be showed by a command for example the command will be "/text" and when I type it to be shown a textdraw which will disappear in 10 seconds ? ( I don't need GameTextForPlayer)
CMD:text(playerid,params[])
{
TextDrawShowForPlayer(playerid,TDid);
SetTimerEx("HideMessage", timehere, 0, "i", playerid);
return 1;
}
forward HideMessage(playerid);
public HideMessage(playerid)
{
TextDrawHideForPlayer(playerid, TextdrawID);
}
CMD:text(playerid, params[])
{
TextDrawShowForPlayer(playerid, TextDraw1);
return 1;
}
CMD:text(playerid, params[])
{
TextDrawShowForPlayer(playerid, TextDraw1);
SetTimerEx("TextDrawHide", 10000,"d", playerid false); //10 Seconds
return 1;
}
forward TextDrawHide(playerid);
public TextDrawHide(playerid)
{
TextDrawHideForPlayer(playerid, TextDraw1);
return 1;
}
CMD:text(playerid,params[]) //Creating the command.
{ //Opening brackets to execute functions
TextdrawShowForPlayer(L-text); //Replace with your textdraw.
SetTimerEx("RemoveText", 50000, false, "d", playerid); //Creating a timer.
return 1; //Returning functions.
} //Closing command.
forward RemoveText(playerid) //Forwarding the remove text timer.
public RemoveText(playerid) //Adding functions to the timer to perform after the timer used in the test command.
{ //Opening brackets to execute function.
TextdrawHideForPlayer(L-text); //Removing textdraw, replace with your textdraw code.
return 1; //Returning functions.
} //Closing brackets