08.09.2018, 13:09
A few things that aren't such a good idea:
The player-related TextDraws are global. You use at least 9 per player, so theoretically it's not even possible to create enough for more than 227 players. You attempt to create 9000 TextDraws.
Now you could argue you won't ever race with 227 players, but that doesn't matter as you create all of them at startup. So players with an ID higher than 227 will not see any TDs, regardless how many players are actually in the race. This will probably mess up TDs for the gamemode too, if these are created first.
Use Player TDs for the ones that should contain info for each player, and global TDs for TextDraws that show the same for everyone (but just 1 in total, not 1000).
Or at least create the TDs ONLY at the start of the race for each player in a race, and destroy them again when they leave/finish/disconnect. But that's still not such a good idea.
The player-related TextDraws are global. You use at least 9 per player, so theoretically it's not even possible to create enough for more than 227 players. You attempt to create 9000 TextDraws.
Now you could argue you won't ever race with 227 players, but that doesn't matter as you create all of them at startup. So players with an ID higher than 227 will not see any TDs, regardless how many players are actually in the race. This will probably mess up TDs for the gamemode too, if these are created first.
Use Player TDs for the ones that should contain info for each player, and global TDs for TextDraws that show the same for everyone (but just 1 in total, not 1000).
Or at least create the TDs ONLY at the start of the race for each player in a race, and destroy them again when they leave/finish/disconnect. But that's still not such a good idea.