TextDrawSetString
#1

Can sombody show an example of how it would be used? wiki doesnt have one..
Reply
#2

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);
}
Reply
#3

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...
Reply
#4

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..)
Reply
#5

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.
Reply
#6

thanks you shall be in my credits.. in new FS..
Reply
#7

https://sampwiki.blast.hk/wiki/TextDrawSetString
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)