Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. test = 0
  2.  
  3. function ChairFunc()
  4.  
  5.    
  6.  
  7.     local x = math.random(1,256) //Generates the X variable
  8.     local y = math.random(1,256) //Generates the Y variable
  9.     local z = math.random(1.256) //Generates the Z variable
  10.  
  11.         local chairposition = Vector( x, y, z ) //Should generate a vector based on the random variables
  12.        
  13.     Msg(chairposition)
  14.        
  15.     local ent = ents.Create ("prop_physics") //Create chairs which are immovable
  16.     ent:SetModel ("models/props_c17/FurnitureChair001a.mdl")
  17.     ent:SetPos (chairposition)
  18.     ent:Spawn()
  19.    
  20.     test = test + 1
  21.    
  22.     end
  23.    
  24.     repeat
  25.    
  26.         ChairFunc()
  27.        
  28.     until test == 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement