Jump to content

Ayuda createPickup


Plate

Recommended Posts

Hola alguien me podria decir por que este script no anda tampoco me da error

function dejar() 
            local row, col = guiGridListGetSelectedItem ( itemGrid ) 
            if ( row and col and row ~= -1 and col ~= -1 ) then 
                local item = guiGridListGetItemText ( itemGrid, row, 1 ) 
                local ammo = guiGridListGetItemText ( itemGrid, row, 2 ) 
                local x, y ,z = getElementPosition(localPlayer) 
                local pickup = createPickup(x + 5, y, z, 2, item, 3000, ammo) 
end 
end 
addEventHandler("onClientGUIClick", tirar, dejar, false) 

Link to comment
function dejar() 
            local row, col = guiGridListGetSelectedItem ( itemGrid ) 
            if ( row and col and row ~= -1 and col ~= -1 ) then 
                local item = guiGridListGetItemText ( itemGrid, row, 1 ) 
                local ammo = guiGridListGetItemText ( itemGrid, row, 2 ) 
                local itemName = getWeaponIDFromName(item) 
                local x, y ,z = getElementPosition(localPlayer) 
                local pickup = createPickup(x + 5, y, z, 2, itemName, 3000, tonumber(ammo)) 
                triggerServerEvent("onPlayerPullItem", localPlayer, itemName, ammo) 
end 
end 
addEventHandler("onClientGUIClick", tirar, dejar, false) 

pero tengo que usar onPickupHit no para que le de el arma con la ammo

Link to comment
function dejar() 
if source == tirar then 
            local row, col = guiGridListGetSelectedItem ( itemGrid ) 
            if ( row and col and row ~= -1 and col ~= -1 ) then 
                local item = guiGridListGetItemText ( itemGrid, row, 1 ) 
                local ammo = guiGridListGetItemText ( itemGrid, row, 2 ) 
                local itemName = getWeaponIDFromName(item) 
                local x, y ,z = getElementPosition(localPlayer) 
                local pickup = createPickup(x + 5, y, z, 2, itemName, 3000, tonumber(ammo)) 
                triggerServerEvent("onPlayerPullItem", localPlayer, itemName, ammo) 
end 
end 
end 
addEventHandler("onClientGUIClick", root, dejar) 

Link to comment
  • Recently Browsing   0 members

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