TrmPlmn Posted February 14, 2021 Share Posted February 14, 2021 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 comment
Hydra Posted February 14, 2021 Share Posted February 14, 2021 function b(thePlayer, matchingDimension) for k, v in ipairs(getElementsByType("vehicle")) do destroyElement(v) end end addEventHandler("onColshapeHit", yourColshape, b) Link to comment
TrmPlmn Posted February 14, 2021 Author Share Posted February 14, 2021 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 comment
Hydra Posted February 14, 2021 Share Posted February 14, 2021 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 comment
TrmPlmn Posted February 14, 2021 Author Share Posted February 14, 2021 Just now, Hydra said: Wait a few minutes, I'm gonna give you an answer soon take your time Link to comment
Hydra Posted February 14, 2021 Share Posted February 14, 2021 --// 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 comment
TrmPlmn Posted February 14, 2021 Author Share Posted February 14, 2021 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 comment
Hydra Posted February 15, 2021 Share Posted February 15, 2021 22 hours ago, TrmPlmn said: it's work but not remove script vehicle only admin panel vehicle wdym, it should work for all vehicles Link to comment
TrmPlmn Posted February 15, 2021 Author Share Posted February 15, 2021 25 minutes ago, Hydra said: wdym, it should work for all vehicles if you can try i make vehicle by this createVehicle ( 432, 0, 0, 0 + 10 ) but i can't use it - i can't drive Link to comment
Hydra Posted February 15, 2021 Share Posted February 15, 2021 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 comment
TrmPlmn Posted February 15, 2021 Author Share Posted February 15, 2021 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 comment
TrmPlmn Posted February 15, 2021 Author Share Posted February 15, 2021 + i want export value for r,g,b from server to client he change every 5 sec how export it ? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now