Jump to content

huh?


joedajoester

Recommended Posts

Posted

The spatula script solidsnake14 helped with ALOT(mostly made :D) it doesnt attach the objects to the car, it attaches them to 1 car and when i use the command, the second car that spawns with it does not have anything attached to it, i tried even getting the past working script and it still doesnt work..

addEventHandler ( "onResourceStart", resourceRoot, 
function () 
local gate1 = createObject(971, 0, 0, 5) 
local gate2 = createObject(971, 0, 0, 5) 
local Car1 = createVehicle ( 567, -1736, -2895, 55, 0, 0, 236 ) 
local Car2 = createVehicle ( 567, -1744, -2913.3000488281, 55, 0, 354.488, 220 ) 
attachElements( gate1, Car1, 0.4, 6.2, -0.6, 90, 90, 90 ) 
attachElements( gate2, Car1, 0.4, 13.2, -0.6, 90, 90, 90 ) 
addVehicleUpgrade ( Car1, 1087 ) 
addVehicleUpgrade ( Car2, 1087 ) 
end) 
  
function attach(thePlayer) 
if not isPedInVehicle(thePlayer) then return end 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then 
local vehicle = getPedOccupiedVehicle(thePlayer) 
local car1gate1 = createObject(971, 0, 0, 5) 
local car1gate2 = createObject(971, 0, 0, 5) 
attachElements( car1gate1, vehicle, 0.4, 6.2, -0.6, 90, 90, 90 ) 
attachElements( car1gate2, vehicle, 0.4, 13.2, -0.6, 90, 90, 90 ) 
addVehicleUpgrade ( vehicle, 1087 ) 
    end 
end 
addCommandHandler ( "spatula", attach)         

Posted
addEventHandler ( "onResourceStart", resourceRoot, 
function () 
local gate1 = createObject(971, 0, 0, 5) 
local gate2 = createObject(971, 0, 0, 5) 
local Car1 = createVehicle ( 567, -1736, -2895, 55, 0, 0, 236 ) 
local Car2 = createVehicle ( 567, -1744, -2913.3000488281, 55, 0, 354.488, 220 ) 
attachElements( gate1, Car1, 0.4, 6.2, -0.6, 90, 90, 90 ) 
attachElements( gate2, Car2, 0.4, 13.2, -0.6, 90, 90, 90 ) 
addVehicleUpgrade ( Car1, 1087 ) 
addVehicleUpgrade ( Car2, 1087 ) 
end) 
  
function attach(thePlayer) 
if not isPedInVehicle(thePlayer) then return end 
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then 
local vehicle = getPedOccupiedVehicle(thePlayer) 
local car1gate1 = createObject(971, 0, 0, 5) 
local car1gate2 = createObject(971, 0, 0, 5) 
attachElements( car1gate1, vehicle, 0.4, 6.2, -0.6, 90, 90, 90 ) 
attachElements( car1gate2, vehicle, 0.4, 13.2, -0.6, 90, 90, 90 ) 
addVehicleUpgrade ( vehicle, 1087 ) 
    end 
end 
addCommandHandler ( "spatula", attach) 

You we're attaching the spatula 1 to both vehicles.

Posted

No, i dont understand how its attaching the same object to each car for the bottom part, i think it has to be like the bottom part where it recreates the object so it can be attached to multiple cars at once

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...