Quote:
Originally Posted by CAR
Now it will be refresh every update for every player
pawn Код:
public UpdateTeamCash() { new string1[60]; new string2[60]; format(string1, sizeof(string1), "Team 1 Cash: %s", T1Cash); format(string2, sizeof(string2), "Team 2 Cash: %s", T2Cash); for(new i; i<MAX_PLAYERS; i++) { TextDrawHideForPlayer(i, Textdraw0); TextDrawHideForPlayer(i, Textdraw1); TextDrawSetString(Textdraw0,string1); TextDrawSetString(Textdraw1,string2); TextDrawShowForPlayer(i, Textdraw0); TextDrawShowForPlayer(i, Textdraw1); } return 1; }
Edit: There was already a reply ^^
|
There's no point of looping TextDrawHideForPlayer and TextDrawShowForPlayer when you can just use TextDrawShowForAll and TextDrawHideForAll, and you basically did exactly what I just did.