Whizz Posted November 8, 2023 Share Posted November 8, 2023 hello to friends This is my script but it doesn't work properly. He does not destroy the car, what is the problem? function PutTruck (thePlayer) if ( source == TahvilVanGang ) then if getElementType(thePlayer) == "player" then if isPedInVehicle ( thePlayer ) then if getElementData(thePlayer,"VanMafiaP") == true then if getPedOccupiedVehicle(thePlayer) == Van then if getPedOccupiedVehicleSeat ( thePlayer ) == 0 then local RandomGold = math.random(50,150) givePlayerMoney(thePlayer,RandomGold) removeElementData(thePlayer,"VanMafiaP") removePedFromVehicle( thePlayer ) if isElement( TahvilVanGang ) then --destroyElement(Van) destroyElement(VanBlip) destroyElement(TahvilVanGang) destroyElement(TahvilVanGangBlip) IsCreate2 = false for index,allplayers in ipairs(getElementsByType("player")) do if getElementData(allplayers,"loggedIn") == true then end end SendPlayers("") end end end end end end end end addEventHandler("onMarkerHit",root,PutTruck) Link to comment
Molvine Posted November 10, 2023 Share Posted November 10, 2023 Maybe because the destroyElement(Van) line is commented out? 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