SA-MP Forums Archive
Texdraw Issue. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Texdraw Issue. (/showthread.php?tid=94960)



Texdraw Issue. - Craze - 02.09.2009

Well, I'm no advanced scripter, I usually do minor edits. But today, I thought I'd give textdraw a go as people say it's really easy and doesn't require any advanced scripting knowledge.

So, basically this is what I'm tryna do. When someones connects to the server, I want the textdraw to appear for 10 seconds for the connected player, and then should disappear.

How can it be done?



Re: Texdraw Issue. - coole210 - 02.09.2009

....


Re: Texdraw Issue. - Craze - 02.09.2009

To be honest, I never really understood pawn properly. So, can you give me direct help please? Meaning, in my case, what would I need to do?

I know to put this on top of the script:

pawn Код:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
and the actual textdraw in the OnGameModeInit section.


Re: Texdraw Issue. - JaTochNietDan - 02.09.2009

Those links explain everything you need to do this.

pawn Код:
public OnPlayerConnect(playerid)
{
  TextDrawShowForPlayer(playerid,Textdraw0);
  TextDrawShowForPlayer(playerid,Textdraw1);
  TextDrawShowForPlayer(playerid,Textdraw2);
  TextDrawShowForPlayer(playerid,Textdraw3);
  SetTimerEx("HideTextDraws",10000,0,"i",playerid);
  return 1;
}

public HideTextDraws(playerid)
{
  TextDrawHideForPlayer(playerid,Textdraw0);
  TextDrawHideForPlayer(playerid,Textdraw1);
  TextDrawHideForPlayer(playerid,Textdraw2);
  TextDrawHideForPlayer(playerid,Textdraw3);
  return 1;
}