cuervox123 Posted December 16, 2015 Share Posted December 16, 2015 Hola,alguien sabe por que al seleccionar otro jugador la municion sale como 9999 o 1 no me dice exactamente la municion que tiene pero la mia si,aqui el codigo. function verararmas() for index=0,12 do if guiGridListGetSelectedItem(gridlistap) ~= -1 then do local player = getPlayerFromName(guiGridListGetItemText(gridlistap, guiGridListGetSelectedItem(gridlistap), 1)) if player then guiSetText(LabelPlayer, getPlayerName(player)) local pla = guiGetText(LabelPlayer) local wea = guiGridListAddRow(armagrid) local id = getPedWeapon( player, index ) guiGridListSetItemText(armagrid, wea, ammo, getPedTotalAmmo ( player, index ), false, false) guiGridListSetItemText(armagrid, wea, weapon, getWeaponNameFromID ( id ), false, false) end end end end end addEventHandler("onClientGUIClick", quitararma, verararmas) Link to comment
cuervox123 Posted December 16, 2015 Author Share Posted December 16, 2015 te digo que al seleccionar a otro jugador me sale todo correctamente lo unico que falla es la cantidad de municion Link to comment
Tomas Posted December 17, 2015 Share Posted December 17, 2015 guiGridListSetItemText(armagrid, wea, ammo, getPedTotalAmmo ( player, getSlotFromWeapon(id)), false, false) Link to comment
Recommended Posts