Jump to content

[HELP] Bot


kikos500

Recommended Posts

  
local object = { } 
function updatePlayerPostion(thePlayer) 
local x1,y1,z1 = getElementPosition(thePlayer) 
local r1,r2,r3 = getElementRotation(thePlayer) 
table.insert(object,x1) 
table.insert(object,y1) 
table.insert(object,z1) 
table.insert(object,r1) 
table.insert(object,r2) 
table.insert(object,r3) 
end 
addCommandHandler("ref",updatePlayerPostion) 
function CreateVehicles(thePlayer) 
object[7] = createVehicle ( 562, object[1], object[2],object[3],object[4],object[5],object[6] )  
-- get the vehicle's position; 
local x,y,z = getElementPosition( object[7] ) 
-- create the samsite; 
object[8] = createObject ( 3267, x, y, z + 3,object[1], object[2],object[3] ) 
-- attach the samsite to the elegy; 
attachElements ( object[8], object[7] ) 
end 
addCommandHandler("spawn",CreateVehicles) 
  
function moveObjects() 
moveObject ( object[8], 1000, object[1], object[2], object[3],object[4],object[5],object[6] ) 
end 
setTimer(moveObjects,1000,0) 
  

im making a bot so the script starts with spawning a car then attaching element to it then move object using the player postion but it doesn't work the car spawns and element attached but the bot doesn't move and its invisble i can't hit it

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...