Plate Posted May 27, 2013 Share Posted May 27, 2013 Hola tengo un problema con este script es que no funciona no tengo idea de por que function checkSkills() local colt = getPedStat ( localPlayer, 69 ) if ( colt >= 40 <= 998 ) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Pistol Skill 3", false, false) elseif (colt < 40 ) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Pistol Skill 2", false, false) local silenced = getPedStat(localPlayer, 70) if ( silenced < 500) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Silenced Skill 2", false, false) elseif ( silenced >= 500 <= 998) then local row = guiGridListAddRow(skillGrid) guiGridListSetItemText(skillGrid, row, 1, "Silenced Skill 3", false, false) end end end addEvent("onClientWeaponShop", true) addEventHandler("onClientWeaponShop", getRootElement(), checkSkills) Link to comment
Castillo Posted May 27, 2013 Share Posted May 27, 2013 Si no nos decis cual es el problema exacto, no podemos ayudarte. Link to comment
Plate Posted May 27, 2013 Author Share Posted May 27, 2013 No aparecen los textos en la grid Link to comment
Castillo Posted May 27, 2013 Share Posted May 27, 2013 if ( colt >= 40 <= 998 ) then Eso no tiene sentido. Link to comment
Plate Posted May 27, 2013 Author Share Posted May 27, 2013 (edited) Gracias solid otra duda por que los maxsSlots no funcionan y esto de slots si me aparece function getSlots() local slots = getElementData(localPlayer, "Slots") local maxsSlots = getElementData(localPlayer, "maxSlots") guiSetText(texto, "Inventario Lleno") guiLabelSetColor(texto, 255, 0, 0, 255) guiSetText(usedSlot, " "..slots.."") guiSetText(slots, " /"..maxsSlots.."") end me dice esto Bad Argumento guiSetText[ expected gui-element at argument 1 got number "20" pero 20 son los slots no los max slots Edited May 27, 2013 by Guest Link to comment
Plate Posted May 27, 2013 Author Share Posted May 27, 2013 Se supone que un numero al igual que Slots Link to comment
Castillo Posted May 27, 2013 Share Posted May 27, 2013 No pregunte a que se supone que devuelva, sino que devuelve. Link to comment
Plate Posted May 27, 2013 Author Share Posted May 27, 2013 Me duvuelve un numero usando esto function check() local slots = getElementData(localPlayer, "maxSlots") outputChatBox(slots) end addCommandHandler("2", check) pero si uso el otro no sirve Link to comment
Castillo Posted May 27, 2013 Share Posted May 27, 2013 function getSlots() local slots = getElementData(localPlayer, "Slots") local maxsSlots = getElementData(localPlayer, "maxSlots") guiSetText(texto, "Inventario Lleno") guiLabelSetColor(texto, 255, 0, 0, 255) guiSetText(usedSlot, " "..slots.."") guiSetText(slots, " /"..maxsSlots.."") end "slots" es un numero y lo estas usando como elemento, supongo que ya tendras una label o algo llamado "slots", pero si definis otra variable con el mismo nombre, no servira. Link to comment
Plate Posted May 27, 2013 Author Share Posted May 27, 2013 function getSlots() local slots = getElementData(localPlayer, "Slots") local maxsSlots = getElementData(localPlayer, "maxSlots") guiSetText(texto, "Inventario Lleno") guiLabelSetColor(texto, 255, 0, 0, 255) guiSetText(usedSlot, " "..slots.."") guiSetText(slots, " /"..maxsSlots.."") end "slots" es un numero y lo estas usando como elemento, supongo que ya tendras una label o algo llamado "slots", pero si definis otra variable con el mismo nombre, no servira. Ah no me di cuenta :facepalm: muchas gracias solid por tu ayuda Link to comment
Recommended Posts