AlvareZ_ Posted March 16, 2013 Share Posted March 16, 2013 No se por que no me quiere agarrar, en el debug me dice: Attempt to contatemate global 'Exp' (a bpolean value) Client-Side: Exp = "-" function hideIt(myExp) Exp = myExp end addEvent("watafaka",true) addEventHandler("watafaka",root,hideIt) addEventHandler("onClientRender", root, function() dxDrawText("#878787Exp : #FF7700"..Exp, 0, 195, 183, 351, tocolor(0, 255, 251, 255), 1,"pricedown", "left", "center", false, false, true, true, false) end ) Server-Side: function onZombieWasted(_,killer) if (killer) then if (getElementType(killer) == "player") and (getElementType(source) == "ped") then if (getElementData(source, "zombie") == true) then local account = getPlayerAccount(killer) if account and not isGuestAccount(account) then local myExp = exports.exp_system:getPlayerLevel ( thePlayer ) triggerClientEvent(killer,"watafaka",killer,myExp) end end end end end addEventHandler("onPedWasted", root, onZombieWasted) Link to comment
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Share Posted March 16, 2013 Xq Exp no es Global..Por eso te tira error.. Link to comment
AlvareZ_ Posted March 16, 2013 Author Share Posted March 16, 2013 A que te refieres con "global" ? Link to comment
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Share Posted March 16, 2013 donde estas obteniendo Exp? seria local myExp = exports.exp_system:getPlayerLevel ( thePlayer ) Exp = tostring (myExp) O Exp = myExp Proba poniendo eso Server-Side Link to comment
AlvareZ_ Posted March 16, 2013 Author Share Posted March 16, 2013 Intente las dos y sigue Igual. Link to comment
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Share Posted March 16, 2013 Proba usando tablas...E insertando luego...Y despues obtener la info de la tabla.. Link to comment
Castillo Posted March 16, 2013 Share Posted March 16, 2013 donde estas obteniendo Exp?seria local myExp = exports.exp_system:getPlayerLevel ( thePlayer ) Exp = tostring (myExp) O Exp = myExp Proba poniendo eso Server-Side Usa: getElementData ( localPlayer, "exp" ) addEventHandler("onClientRender", root, function() dxDrawText("#878787Exp : #FF7700".. tostring ( getElementData ( localPlayer, "exp" ) ), 0, 195, 183, 351, tocolor(0, 255, 251, 255), 1,"pricedown", "left", "center", false, false, true, true, false) end ) Link to comment
AlvareZ_ Posted March 16, 2013 Author Share Posted March 16, 2013 Listo, Muchas Gracias. Seria igual con el nivel no ? getElementData ( localPlayer, "level" ) Link to comment
Recommended Posts