Hi ,
Can someone help me with this?
local x,y,z,rx,ry,rz= 0,15,15,0,0,0
function createpirateship(cmd)
local lx,ly,lz = getElementPosition(getLocalPlayer())
lx = lx + 5
veh = createVehicle( 484, lx, ly, lz)
base = createObject( 8493, 2,2,2)
setElementCollisionsEnabled ( base, false )
attachElements ( base, veh, x,y,z,rx,ry,rz)
end
function rotateIt(cmd, addZ)
if(addZ) then
rz=rz+addZ
setElementAttachedOffsets (base,x,y,z,rx,ry,rz)
end
end
addCommandHandler("pirate", createpirateship)
addCommandHandler("rotate", rotateIt)
The problem is that after i created the vehicle , i can't drive it.
I know im a noob (started to learn lua 2 days ago)
Can someone help me correct this problem , and is there any "GetCurrentVehicle" to attach the objects on the vehicle while i'm in it?