TextDraw
#1

So i made this

Код:
}
if(strcmp("/help", cmdtext, true, 5) == 0)
{

new Text:Help1;
new Text:Help2;
new Text:Help4;
new Text:Help5;
new Text:Info;

Info = TextDrawCreate(200,230, "Help info:");
Help1 = TextDrawCreate(200,250, "Type /cmds for a list of commands");
Help2 = TextDrawCreate(200,270, "Type /teles for a list of teleports");
Help4 = TextDrawCreate(200,290, "Type /serverinfo for server info");
Help5 = TextDrawCreate(200,310, "Type /rules to see the server rules");

TextDrawShowForPlayer(playerid, Help1);
TextDrawShowForPlayer(playerid, Help2);
TextDrawShowForPlayer(playerid, Help4);
TextDrawShowForPlayer(playerid, Help5);
TextDrawShowForPlayer(playerid, Info);

return 1;
How can i make an auto hide after 10 seconds for these textdraws.
Reply
#2

Use SetTimer/SetTimerEx function with TextDrawHideForPlayer/TextDrawHideForAll function.
Reply
#3

Something like this?

public OnPlayerCommandText(playerid, cmdtext[])

SetTimerEx("Help",10000,1,"i",playerid);

TextDrawHideForPlayer(playerid, Info);

Reply
#4

pawn Код:
forward MyTimer(playerid);

public MyTimer(playerid)
{
  TextDrawHideForPlayer(playerid, MyTextDraw);
  return 1;
}

SetTimerEx("MyTimer", 10000, false, "i", playerid);
Reply
#5

Oh thank you
Reply
#6

You're welcome. If there's any problem with it, just post in this topic.
Reply
#7

I will
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)