Jump to content

vehicle


TrmPlmn

Recommended Posts

hello i make colshape to remove all vehicle hit it

but when vehicle hit with out driver nothing change

when i drive vehicle and hit colshape it's remove

how to make remove all vehicle with driver or with out

Link to post
function b(thePlayer, matchingDimension)
  for k, v in ipairs(getElementsByType("vehicle")) do
    destroyElement(v)
    end
  end
addEventHandler("onColshapeHit", yourColshape, b)

 

Link to post
15 minutes ago, Hydra said:

function b(thePlayer, matchingDimension)
  for k, v in ipairs(getElementsByType("vehicle")) do
    destroyElement(v)
    end
  end
addEventHandler("onColshapeHit", yourColshape, b)

 

i use it in client and server not work

i change ' YourColshape' to my colshape name but not work

Link to post
1 minute ago, TrmPlmn said:

i use it in client and server not work

i change ' YourColshape' to my colshape name but not work

Wait a few minutes, I'm gonna give you an answer soon

Link to post
--// Server side

function asd(thePlayer, matchingDimension)
for k, v in ipairs(getElementsByType("vehicle")) do
if isElementWithinColShape(v, yourCol) then
destroyElement(v)
else
end
end
end
addEventHandler("onColShapeHit", yourCol, asd)

 

Link to post
51 minutes ago, Hydra said:

--// Server side

function asd(thePlayer, matchingDimension)
for k, v in ipairs(getElementsByType("vehicle")) do
if isElementWithinColShape(v, yourCol) then
destroyElement(v)
else
end
end
end
addEventHandler("onColShapeHit", yourCol, asd)

 

it's work but not remove script vehicle

only admin panel vehicle 

Link to post
32 minutes ago, TrmPlmn said:

 


createVehicle ( 432, 0, 0, 0 + 10 )

but i can't use it - i can't drive

If you use createVehicle in client-side you can't drive the vehicles

Note: Vehicles (and other elements) created client-side are only seen by the client that created them, aren't synced and players cannot enter them. They are essentially for display only.

 

Link to post
1 hour ago, Hydra said:

If you use createVehicle in client-side you can't drive the vehicles


Note: Vehicles (and other elements) created client-side are only seen by the client that created them, aren't synced and players cannot enter them. They are essentially for display only.

 

done i make it server

but vehicle don't removed when it don't touch any object

must i touch vehicle when it in colshape to remove

Link to post

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