Jump to content

roddydennvor

Members
  • Posts

    132
  • Joined

  • Last visited

Posts posted by roddydennvor

  1. hmm not work :

    if exports.global:hasItem(theVehicle, 10) then

    setVehicleHandling(theVehicle, "maxVelocity", 300.0)

    setVehicleHandling(theVehicle, "engineAcceleration", 90.0 )

    end

  2. Hii there , how to use setmodelhandling with item system ?

    So when i have item id 10 in my vehicle , then my vehicle velocity +30 from normal velocity and my vehicle brake ABS turn to True ..

  3. How to change this Script...

    I want this script set to addeventhandler , not addcommandhandler

    And how to edit this script so when i use item id 90 then this script will be work ... ??

    local cases = {} 
      
    for i,v in ipairs(getElementsByType("player"))do 
    setElementData(v, "ffhelmet", 0) 
    end 
      
    addCommandHandler("ffhelmet", 
        function(player) 
            if(getResourceState(getResourceFromName("bone_attach")) == "running")then 
                if(getElementType(player) == "player")then 
                    if(getElementData(player, "helmet") ~= 1)then 
                        setElementData(player, "helmet", 1) 
                        case = createObject(2054,0,0,0) 
                        exports.bone_attach:attachElementToBone(case,player,1,0,0.04,0.06,0,0,180) 
                        cases[player] = case 
                    elseif(getElementData(player, "helmet") == 1)then 
                        setElementData(player, "helmet", 0) 
                        exports.bone_attach:detachElementFromBone(cases[player]) 
                        destroyElement(cases[player]) 
                    end 
                end 
            else 
                outputChatBox("ERROR #1", player, 255, 50, 0) 
            end 
        end 
    ) 
    

  4. no no , i want to upgrade this script , so if i have item id 49 i can repair vehicles.

    i just try to add this :

    if not(exports.global:hasItem(thePlayer, 49)) then

    outputChatBox("You need a fishing rod to fish.", thePlayer, 255, 0, 0)

    .........

    But nothing happend

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

  6. Hii there ,

    So i just want to set player skin when the player use an item...

    For example..

    If the player use item id 40 then , the skin change to skin id 191

    Thank you , Your help will be appreciate :) :)

  7. Hii there , i have some interior system , well ..

    I just want to make some features ....

    So when the player is offline then the interior is automaticly lock ... But how ?

    Please help me... Thx before... Your help will be appreciate :)

  8. So i must to edit this script like this ...???

      
    function updateTime() 
        local offset = 3600 * 9 
        local realtime = getRealTime() 
        hour = realtime.hour - offset 
        if hour >= 24 then 
            hour = hour - 24 
        elseif hour < 0 then 
            hour = hour + 24 
        end 
      
        minute = realtime.minute 
      
        setTime(hour, minute) 
      
        nextupdate = (60-realtime.second) * 1000 
        setMinuteDuration( nextupdate ) 
        setTimer( setMinuteDuration, nextupdate + 5, 1, 60000 ) 
    end 
      
    addEventHandler("onResourceStart", getResourceRootElement(), updateTime ) 
      
    -- update the time every 30 minutes (correction) 
    setTimer( updateTime, 1800000, 0 ) 
      
    

  9. hii there , i am from indonesian , but this time is US Time maybe ,,, how to set the time same as my country time ?

    For example ,, this script show time : 18:00 ,,, but in my country the time is 09:00 ,, how to set US time - 12 hours , so

    18:00 - 12 hours = 09:00

    Here is the script :)

      
    function updateTime() 
        local offset = tonumber(get("offset")) or 0 
        local realtime = getRealTime() 
        hour = realtime.hour + offset  
        if hour >= 24 then 
            hour = hour - 24 
        elseif hour < 0 then 
            hour = hour + 24 
        end 
      
        minute = realtime.minute 
      
        setTime(hour, minute)  
      
        nextupdate = (60-realtime.second) * 1000 
        setMinuteDuration( nextupdate ) 
        setTimer( setMinuteDuration, nextupdate + 5, 1, 60000 ) 
    end 
      
    addEventHandler("onResourceStart", getResourceRootElement(), updateTime ) 
      
    -- update the time every 30 minutes (correction) 
    setTimer( updateTime, 1800000, 0 ) 
      
    

×
×
  • Create New...