About TextDrawSetStrings - 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: About TextDrawSetStrings (
/showthread.php?tid=160408)
About TextDrawSetStrings -
ViruZZzZ_ChiLLL - 16.07.2010
Why is it that if I set a string on something "TimerEx"
I even see the other players Textdraw.
Example :
pawn Код:
forward Stats(playerid);
public Stats(playerid)
{
new string[156];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "~b~Name : ~w~(%s) ~b~Cash : ~w~($%d) ~b~Score : ~w~(%d) ~b~Ping : ~w~(%d) ~b~Kills : ~w~(%d) ~b~Death : ~w~(%d) ~b~ID : (%d)", name, GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPlayerPing(playerid), kills1[playerid], death1[playerid], playerid);
TextDrawSetString(StatsTD, string);
return 1;
}
Re: About TextDrawSetStrings -
Hiddos - 16.07.2010
I guess you're using just ONE textdraw (single-variable)
Re: About TextDrawSetStrings -
[HUN]Jaki - 16.07.2010
Exactly.
pawn Код:
forward Stats(playerid);
new Text:StatsTD[MAX_PLAYERS];
public Stats(playerid)
{
//(...)
TextDrawSetString(StatsTD[playerid], string);
return 1;
}
Re: About TextDrawSetStrings -
ViruZZzZ_ChiLLL - 16.07.2010
Quote:
Originally Posted by [HUN]Jaki
Exactly.
pawn Код:
forward Stats(playerid); new Text:StatsTD[MAX_PLAYERS]; public Stats(playerid) { //(...) TextDrawSetString(StatsTD[playerid], string); return 1; }
|
Nvr actually thought of that xD
Thanks =)
Re: About TextDrawSetStrings -
Hijolion - 24.07.2010
[playerid] creates different variable for each players, keep that in mind.