Jump to content

[HELP] destroyElement


Whizz

Recommended Posts

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

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