• [HELP] Random Player Spawner
    3 replies, posted
I got a similar problem. I wanted to create a custom player spawner, but when i load it ingame, gmod crashes. any help is highly appreciated ! [CODE] local playerspawns = { "(6971.133301, 6515.624023, 64.031250)", } hook.Add("PlayerSelectSpawn", "selectplayerspawn", function(ply) local spawns = table.Random(playerspawns) ply:SetPos( Vector(spawns) ) ply:Spawn(ply:GetPos) return true end) [/CODE]
Does the game crash with 'Pure virtual function call' error?
[code]local playerspawns = { Vector(6971.133301, 6515.624023, 64.031250), Vector(111.133301, 568, 864) } hook.Add ("PlayerSpawn", "selectplayerspawn", function( ply ) ply:SetPos( table.Random(playerspawns) ) end )[/code]
Thanks a lot, again !!
Sorry, you need to Log In to post a reply to this thread.