This is my script to spawn players
But it doesn't work for me, how to fix?
[CODE]
hook.Add( "PlayerSpawn", "spawnposyay", function( ply )
if game.GetMap() == "rp_downtown_v2" then
local pos = { "Vector( 2831, -2550, -131 )", "Vector( 2839, 2713, -131 )", "Vector( 2735, -2721, -131 )", "Vector( 2500, -2720, -131 )", "Vector( 2462, -2530, -131 )", "Vector( 2682, -2500, -131 )"}
ply:SetPos( table.Random( pos ) )
end
end )
[/CODE]
[QUOTE=lua_error;36101743]
[lua]
local pos = { "Vector( 2831, -2550, -131 )", "Vector( 2839, 2713, -131 )", "Vector( 2735, -2721, -131 )", "Vector( 2500, -2720, -131 )", "Vector( 2462, -2530, -131 )", "Vector( 2682, -2500, -131 )"}
[/lua]
[/QUOTE]
This table is comprised of strings, not vectors. Take the quotation marks off of each one and try it.
Yeah, i made it myself in 5 minutes after made this topic but thanks for answer!
Sorry, you need to Log In to post a reply to this thread.