Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test = 0
- function Timer() //Create the Function for a fucking timer
- local Timer = math.random(15,30)
- timer.Simple( timer, ChairFunc)
- end
- function ChairFunc()
- local x = math.random(1,256) //Generates the X variable
- local y = math.random(1,256) //Generates the Y variable
- local z = -130 //math.random(1,256) Generates the Z variable but is subject to change based on map
- local chairposition = Vector( x, y, z ) //Should generate a vector based on the random variables
- Msg(chairposition)
- local ent = ents.Create ("prop_physics") //Create chairs which are immovable
- ent:SetModel ("models/props_c17/FurnitureChair001a.mdl") //sets the chairs model
- ent:SetPos (chairposition) //sets chair position from the Vectors
- ent:Spawn() //Spawns the ent
- test = test + 1 //Adds 1 onto a variable for the repeat call
- end
- repeat //repeats the defined function, in this case ChairFunc
- ChairFunc()
- until test == 5 //Will repeat until the test variable equals 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement