Jump to content

HELP ITEM CHECK


Recommended Posts

hii there , i want to make this script work if the player have item id 49 , but how ... ?

Here is the script

  
function serviceVehicle(veh) 
    if (veh) then 
        local mechcost = 100000 
        if (getElementData(source,"faction")==16)  then  
            mechcost = mechcost / btrdiscountratio   
        end 
        if not exports.global:takeMoney(source, mechcost) then 
            outputChatBox("Kamu tidak dapat membayar service ini.", source, 255, 0, 0) 
        else 
            local health = getElementHealth(veh) 
            if (health <= 850) then 
                health = health + 150 
            else 
                health = 1000 
            end          
             
            fixVehicle(veh) 
            setElementHealth(veh, health) 
            if not getElementData(veh, "Impounded") or getElementData(veh, "Impounded") == 0 then 
                exports['anticheat-system']:changeProtectedElementDataEx(veh, "enginebroke", 0, false) 
                if armoredCars[ getElementModel( veh ) ] then 
                    setVehicleDamageProof(veh, true) 
                else 
                    setVehicleDamageProof(veh, false) 
                end 
            end 
            exports.global:sendLocalMeAction(source, "memperbaiki kendaraan.") 
            exports.logs:dbLog(source, 31, {  veh }, "REPAIR QUICK-SERVICE") 
        end 
    else 
        outputChatBox("Kamu harus berada di dalam kendaraan yang akan di perbaiki.", source, 255, 0, 0) 
    end  
end 
addEvent("serviceVehicle", true) 
addEventHandler("serviceVehicle", getRootElement(), serviceVehicle) 
  

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