TextDrawSetString - 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: TextDrawSetString (
/showthread.php?tid=121447)
TextDrawSetString -
DiddyBop - 17.01.2010
Can sombody show an example of how it would be used? wiki doesnt have one..
Re: TextDrawSetString -
s0nic - 17.01.2010
Here is a example:
pawn Код:
forward CheckPlayersOnline();
public CheckPlayersOnline()
{
new string[128];
new PlayersOnline = 0;
for(new i = 0; i < GetMaxPlayers(); i++)
{
if (IsPlayerConnected(i) && !IsPlayerNPC(i))
{
PlayersOnline++;
}
}
format(string,sizeof(string),"Players Online: %d", PlayersOnline);
TextDrawSetString(POnline, string);
}
Re: TextDrawSetString -
Miguel - 17.01.2010
pawn Код:
TextDrawSetString(textdraw, "textdraw text");
or
pawn Код:
new
string[45];
format(string, sizeof(string), "%s made this textdraw", GetPlayeName(playerid));
TextDrawSetString(textdraw, string); // textdraw == textdraw name or ID...
Re: TextDrawSetString -
DiddyBop - 17.01.2010
Oh it just changes the old textdraw string to a new one? like..
Old one Players Online: 22
Then the timer proccessed.. and TextDrawSetString Made it to current players like
Players Online: 20 ? (Just example..)
Re: TextDrawSetString -
Miguel - 17.01.2010
Quote:
Originally Posted by G Spot ©
Oh it just changes the old textdraw string to a new one? like..
Old one Players Online: 22
Then the timer proccessed.. and TextDrawSetString Made it to current players like
Players Online: 20 ? (Just example..)
|
Yes, as simple as that.
Re: TextDrawSetString -
DiddyBop - 17.01.2010
thanks

you shall be in my credits.. in new FS..
Re: TextDrawSetString -
Miguel - 17.01.2010
https://sampwiki.blast.hk/wiki/TextDrawSetString