Jump to content

Arma primaria


Plate

Recommended Posts

No creo que este bien pero ...

      function setweapon() 
        local row, col = guiGridListGetSelectedItem ( lista ) 
        if ( row and col and row ~= -1 and col ~= -1 ) then 
            local weaponName = guiGridListGetItemText ( lista, row, 1 ) 
    local pedSlot = getPedWeaponSlot ( source ) 
    if (pedSlot == 6 or pedSlot == 5) then 
        setElementData(source, "Arma1", true) 
        if getElementData(source, "Arma1" ) then 
        outputChatBox("Ya tienes un arma primaria", source, 0, 255, 0) 
        outputChatBox("Te equipastes un arma primaria", source, 0, 255, 0) 
        elseif( pedSlot ==1 or pedSlot == 2 or pedSlot == 3 or pedSlot == 4 or pedSlot == 7 or pedSlot == -- s8) --> then 
        setElementData(source, "Arma2", true) 
        outputChatBox("Te equipastes un arma secundaria", source, 0, 255, 0) 
        elseif getElementData(source, "Arma2") then 
        outputChatBox("Ya tienes un arma secundaria", source, 255, 0, 0) 
    setPedWeaponSlot(localPlayer, getSlotFromWeapon(weaponName)) 
    end 
    end 
    end 
    addEventHandler("onClientGUIClick", equipar, setweapon, false) 
  

Link to comment
  • Recently Browsing   0 members

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