Chaning
hook.Add( "TTTBeginRound", "loadout_distribute", function()
for k, ply in pairs( player.GetAll() ) do
To
hook.Add( "TTTPrepareRound", "loadout_distribute", function()
for k, ply in pairs( player.GetAll() ) do
It gives the weapons, but they don't appear. I mean, it says "Loadout spawned" and in the left on the screen shows the weapons. But you dont have them.
Include screenshots of what you are talking about, if you could please.
This is just conjecture but I think trying to give weapons to the player at the exact same time they are spawning could lead to weird issues. Perhaps use of a one or two second timer could eliminate such issues but then that opens up the problem of players who join after that period being left out of receiving their loadouts. Maaaybe using the PlayerSpawn hook with a short timer and a boolean check to see if the round has not started yet would be the best option for you. I forget the name of that function at the moment...
[QUOTE=Exho;52033949]Include screenshots of what you are talking about, if you could please.
This is just conjecture but I think trying to give weapons to the player at the exact same time they are spawning could lead to weird issues. Perhaps use of a one or two second timer could eliminate such issues but then that opens up the problem of players who join after that period being left out of receiving their loadouts. Maaaybe using the PlayerSpawn hook with a short timer and a boolean check to see if the round has not started yet would be the best option for you. I forget the name of that function at the moment...[/QUOTE]
The players spawn after the hook is called, so it won't work anyway
From the PrepareRound function:
[lua]timer.Simple(0.01, SpawnEntities)[/lua]
Sorry, you need to Log In to post a reply to this thread.