Jump to content

Dimmitry007

Members
  • Posts

    145
  • Joined

  • Last visited

Posts posted by Dimmitry007

  1.   
    addEvent( "helmet", true ) 
      
    local cases = {} 
      
    for i,v in ipairs(getElementsByType("player"))do 
            setElementData(v, "helmet", 0) 
    end 
        
    function helmet( source ) 
        if (getResourceState(getResourceFromName("bone_attach")) == "running") then 
            if (getElementData(source, "helmet") ~=1) then 
                setElementData(source, "helmet", 1) 
                case = createObject(1210,0,0,0) 
                exports.bone_attach:attachElementToBone(case,source,12,0,0.05,0.27,0,180,0) 
                cases[source] = case 
                outputChatBox("Helmet:- True.", source, 0, 255, 0) 
            else 
                setElementData(source, "helmet", 0) 
                exports.bone_attach:detachElementFromBone(cases[source]) 
                destroyElement(cases[source]) 
                outputChatBox("Helmet:- False.", source, 255, 50, 0) 
            end 
            
        else 
            outputChatBox("ERROR #2 Resource not found.", source, 255, 50, 0) 
        end 
    end 
      
    addEventHandler( "helmet", root, helmet ) 
    

      
      
    elseif (itemID==90) then  
                triggerServerEvent("helmet", root, source) 
                takeItemFromSlot(source, itemSlot) 
      
      
    

  2. hello guys i made wallhack script for admins you just type /wallon and /walloff you can change it to what ever you want

    i sell this script for 2 euros you can go to this website multimodes.enjin.com register and then donate and i'll add you friend and i'll send you link to download it

    here's a screen shot for the script it works 10/10

    GJQcAgc.png

    peace out

  3. you're using player instead of source

      
    addEvent( "helmet", true ) 
      
    local cases = {} 
      
    for i,v in ipairs(getElementsByType("player"))do 
            setElementData(v, "helmet", 0) 
    end 
        
    function helmet( source ) 
        if (getResourceState(getResourceFromName("bone_attach")) == "running") then 
            if (getElementData(source, "helmet") ~=1) then 
                setElementData(source, "helmet", 1) 
                case = createObject(1210,0,0,0) 
                exports.bone_attach:attachElementToBone(case,player,12,0,0.05,0.27,0,180,0) 
                cases[source] = case 
                outputChatBox("Helmet:- True.", source, 0, 255, 0) 
            else 
                setElementData(source, "helmet", 0) 
                exports.bone_attach:detachElementFromBone(cases[source]) 
                destroyElement(cases[source]) 
                outputChatBox("Helmet:- False.", source, 255, 50, 0) 
            end 
            
        else 
            outputChatBox("ERROR #2 Resource not found.", source, 255, 50, 0) 
        end 
    end 
      
    addEventHandler( "helmet", root, helmet ) 
    

  4. I don't know what the purpose of the element data, but i assume that you have some other code control the element data 'duty'.
    arrowTable = {} 
      
    addCommandHandler("aduty", 
    function(player) 
        local duty = getElementData(player, "duty") or 0 
        if duty == 0 then 
            if not isElement(arrowTable[player]) then 
                arrowTable[player] = createMarker(0, 0, 0, "arrow", 0.75, 255, 0, 0, 175) 
            end 
            attachElements(arrowTable[player], player, 0, 0, 2) 
        else 
            if isElement(arrowTable[player]) then 
                destroyElement(arrowTable[player]) 
                arrowTable[player] = nil 
            end 
        end 
    end) 
      
    addEventHandler("onPlayerQuit", root, 
    function() 
        if isElement(arrowTable[player]) then 
            destroyElement(arrowTable[player]) 
            arrowTable[player] = nil 
        end 
    end) 
    

    Yea i have another code for duty

  5. Actually you do need table instead of variable, if you wish to have more than one marker at more than one player head.

    Didn't understand but yea i want the arrow for who use the command

  6. like

    function arrow ( thePlayer ) 
         local arrow = createMarker ( 0, 0, 0, "arrow", .75, 255, 0, 0, 175 ) 
         local duty = getElementData(thePlayer, "duty") or 0 
         if duty == 0 then 
        attachElements ( arrow, thePlayer, 0, 0, 2 ) 
    else 
        destroyElement ( arrow ) 
    end 
    end 
    end 
    addCommandHandler("aduty",arrow) 
    

  7. hello i want to make a script when you getelemtdata ( thePlayer, balala, true

    it bind key but if it getelemtdata balala false it get unbinded

    i want to unbind admin panel if it get element data false and i want it to bind it when it getelementdata true

    how i can do that i try to maked one but seems it doesn't work?

    look

    function script ( thePlayer ) 
       local duty = getElementData(player, "duty") or 0 
       if duty == 0 then 
       unbindKey("p","down", "admin") 
       else 
       bindKey("p","down", "admin") 
    end 
    addCommandHandler("aduty",script) 
    

  8. ok can some one test this i'm not in my home to test it will it work? please test it

    function arrow ( thePlayer ) 
        getElementPosition ( thePlayer ) 
        createMarker ( 0, 0, 0, "arrow", .75, 255, 0, 0, 175 ) 
        attachElements ( arrow, thePlayer, 0, 0, 2 ) 
        end 
    end 
    addCommandHandler ( "aduty", arrow ) 
      
      
      
    

×
×
  • Create New...