I am new to Lua coding and GLua and i’m trying to make some cool things I am currently trying to make a custom spawn location, let me explain :
I get x, y, z floats specific to each player and i’d like to spawn the player at those coords.
I tried ply:SetPos in GM:PlayerSpawn : dont work
I tried to create an entity on GM:PlayerSpawn and use it on PlayerSelectSpawn : don’t work because idk which player should use which entity and if i put it in class name, then error entity dont exists
If you have any idea please help me , thx
[editline]20th November 2016[/editline]
I had to add a
function GM:PlayerSpawn ( ply )
– Get data variable here
timer.Simple( 1, function()
ply:SetPos(Vector(data.position_x, data.position_y, data.position_z))
But could you tell me an optimal delay ?