AlvareZ_ Posted March 16, 2013 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)
0xCiBeR Posted March 16, 2013 Posted March 16, 2013 Xq Exp no es Global..Por eso te tira error.. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
0xCiBeR Posted March 16, 2013 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 DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
0xCiBeR Posted March 16, 2013 Posted March 16, 2013 Proba usando tablas...E insertando luego...Y despues obtener la info de la tabla.. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Castillo Posted March 16, 2013 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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
AlvareZ_ Posted March 16, 2013 Author Posted March 16, 2013 Listo, Muchas Gracias. Seria igual con el nivel no ? getElementData ( localPlayer, "level" )
Castillo Posted March 16, 2013 Posted March 16, 2013 Si. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts