About TextDrawSetStrings
#1

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

I guess you're using just ONE textdraw (single-variable)
Reply
#3

Exactly.

pawn Код:
forward Stats(playerid);
new Text:StatsTD[MAX_PLAYERS];
public Stats(playerid)
{
  //(...)
  TextDrawSetString(StatsTD[playerid], string);
  return 1;
}
Reply
#4

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

[playerid] creates different variable for each players, keep that in mind.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)