Jump to content

[HELP] Dealer-Ship


xXGhostXx

Recommended Posts

@xXGhostXx

----------------- DELIVERY SCRIPT BY XXXGHOSTXXX ----------------

local vehicles = createVehicle(ID,x,y,z,rot) ---- put your position
local deliverymarker = createMarker(x,y,z,"cylinder",1.2,255,0,0,255,root)
del = getAccountData(source,"Deliveries") or 0

 
function onDamageProof(seat,jacked) 
setVehicleDamageProof(vehicles,false) 
outputChatBox("Delivery Mission started" ,root)

end 
addEventHandler("onPlayerVehicleEnter",vehicles,onDamageProof) 
addEventHandler("onMarkerHit",deliverymarker,function(player)
setAccountData(player,"Deliveries",1)
givePlayerMoney(player,50000)
outputChatBox("You have been given 1 perk and 50k for delivery",player)
end)
function requestdeliveries(pl)
outputChatBox("You have "..del.." deliveries",pl)
end
addCommandHandler("deliveries",requestdeliveries)

--------------------- END OF SCRIPT BY KNUCK/PREACHER ---------------------

 

Link to comment
1 minute ago, xXGhostXx said:

damage

 

Just now, N3xT said:
  • end
  • )

will not work correctly need more configuration if there is more 1 player in the car then it will not work

so best way is


function damage(lo)
    local elements = getVehicleOccupants(source)
    if(#elements~=0) then -- Check there is a player in the vehicle
        setElementHealth(source,getElementHealth(source)+lo)
    end
end

addEventHandler("onVehicleDamage", root, damage)

 

Link to comment
6 minutes ago, N3xT said:

Why it doesn't work?, /debugscript 3

Dont have error !

3 minutes ago, Knuck said:

@xXGhostXx


----------------- DELIVERY SCRIPT BY XXXGHOSTXXX ----------------

local vehicles = createVehicle(ID,x,y,z,rot) ---- put your position
local deliverymarker = createMarker(x,y,z,"cylinder",1.2,255,0,0,255,root)
del = getAccountData(source,"Deliveries") or 0

 
function onDamageProof(seat,jacked) 
setVehicleDamageProof(vehicles,false) 
outputChatBox("Delivery Mission started" ,root)

end 
addEventHandler("onPlayerVehicleEnter",vehicles,onDamageProof) 
addEventHandler("onMarkerHit",deliverymarker,function(player)
setAccountData(player,"Deliveries",1)
givePlayerMoney(player,50000)
outputChatBox("You have been given 1 perk and 50k for delivery",player)
end)
function requestdeliveries(pl)
outputChatBox("You have "..del.." deliveries",pl)
end
addCommandHandler("deliveries",requestdeliveries)

--------------------- END OF SCRIPT BY KNUCK/PREACHER ---------------------

 

 Script for what ?

3 minutes ago, Master_MTA said:

 

will not work correctly need more configuration if there is more 1 player in the car then it will not work

so best way is


function damage(lo)
    local elements = getVehicleOccupants(source)
    if(#elements~=0) then -- Check there is a player in the vehicle
        setElementHealth(source,getElementHealth(source)+lo)
    end
end

addEventHandler("onVehicleDamage", root, damage)

 

Not work !

Link to comment

this will work 100% xd

----------------- DELIVERY SCRIPT BY XXXGHOSTXXX ----------------

local vehicles = createVehicle(ID,x,y,z,rot) ---- put your position
local deliverymarker = createMarker(x,y,z,"cylinder",1.2,255,0,0,255,root)
del = getAccountData(source,"Deliveries") or 0

 
function onDamageProof(seat,jacked) 
setVehicleDamageProof(vehicles,true) 
outputChatBox("Delivery Mission started" ,root)

end 
addEventHandler("onPlayerVehicleEnter",vehicles,onDamageProof) 
addEventHandler("onMarkerHit",deliverymarker,function(player)
setAccountData(player,"Deliveries",1)
givePlayerMoney(player,50000)
outputChatBox("You have been given 1 perk and 50k for delivery",player)
end)
function requestdeliveries(pl)
outputChatBox("You have "..del.." deliveries",pl)
end
addCommandHandler("deliveries",requestdeliveries)

--------------------- END OF SCRIPT BY KNUCK/PREACHER ---------------------

put the xy,z 

Link to comment
Just now, Knuck said:

this will work 100% xd


----------------- DELIVERY SCRIPT BY XXXGHOSTXXX ----------------

local vehicles = createVehicle(ID,x,y,z,rot) ---- put your position
local deliverymarker = createMarker(x,y,z,"cylinder",1.2,255,0,0,255,root)
del = getAccountData(source,"Deliveries") or 0

 
function onDamageProof(seat,jacked) 
setVehicleDamageProof(vehicles,true) 
outputChatBox("Delivery Mission started" ,root)

end 
addEventHandler("onPlayerVehicleEnter",vehicles,onDamageProof) 
addEventHandler("onMarkerHit",deliverymarker,function(player)
setAccountData(player,"Deliveries",1)
givePlayerMoney(player,50000)
outputChatBox("You have been given 1 perk and 50k for delivery",player)
end)
function requestdeliveries(pl)
outputChatBox("You have "..del.." deliveries",pl)
end
addCommandHandler("deliveries",requestdeliveries)

--------------------- END OF SCRIPT BY KNUCK/PREACHER ---------------------

put the xy,z 

Script for what ?! :|

Link to comment
2 minutes ago, Knuck said:

local vehicles = createVehicle(ID,x,y,z,rot) ---- put your position

function onDamageProof(seat,jacked) 
setVehicleDamageProof(vehicles,true) 

end 
addEventHandler("onPlayerVehicleEnter",vehicles,onDamageProof) 


 vehicle 

 

Not work :(

3 minutes ago, Knuck said:

local vehicles = createVehicle(ID,x,y,z,rot) ---- put your position

function onDamageProof(seat,jacked) 
setVehicleDamageProof(vehicles,true) 

end 
addEventHandler("onPlayerVehicleEnter",vehicles,onDamageProof) 


 vehicle 

 

You want to capture a movie from a script example

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...