Plate Posted July 14, 2012 Share Posted July 14, 2012 hola como se podria hacer para que arriba de la cabeza de un slothbot le aparesca la vida que tiene en una barrita se puede hacer eso? Link to comment
Castillo Posted July 14, 2012 Share Posted July 14, 2012 Si, con las funciones de DirectX podes hacerlo. Link to comment
Castillo Posted July 14, 2012 Share Posted July 14, 2012 https://wiki.multitheftauto.com/wiki/Cli ... _functions Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 solid esto esta bien? function wep ( thePlayer ) local weplvl = exports [ "exp_system" ]:getPlayerLevel ( thePlayer ) if weplvl>= 20 then giveWeapon ( thePlayer, 31, 99999 ) end end addEventHandler("onResourceStart",getRootElement(),wep) es para qe le de un arma a el player cuando el sea level 20 Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 que esta mal? (que no tiene sentido) Link to comment
Castillo Posted July 14, 2012 Share Posted July 14, 2012 Ese evento se usa para cuando un recurso inicia, vos tendrias que usar el evento para cuando el evento de mi sistema de niveles que es: "onPlayerChangeLevel". Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 no me functiono solid function wep ( thePlayer ) local weplvl = exports [ "exp_system" ]:getPlayerLevel ( thePlayer ) if weplvl>= 3 then giveWeapon ( thePlayer, 24, 30000 ) end end addEventHandler("onPlayerChangeLevel",getRootElement(),wep) Link to comment
Castillo Posted July 14, 2012 Share Posted July 14, 2012 1: Cuando usas un evento creado por un script, necesitas usar addEvent tambien. 2: El argumento del jugador de ese evento no es 'thePlayer', es 'source' ( borrra 'thePlayer' del nombre de la funcion y remplazalo en las otras funciones con 'source' ). Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 function wep ( source ) local weplvl = exports [ "exp_system" ]:getPlayerLevel ( source ) if weplvl>= 1 then giveWeapon ( source, 22, 30000 ) end end addEvent("onPlayerChangeLevel",true) addEventHandler("onPlayerChangeLevel",getRootElement(),wep) attempt to compare number whit bolean @server.lua.bak:179: Bad argument @ "getPlayerLevel" [expected player element at argument 1, got 3] Link to comment
Castillo Posted July 14, 2012 Share Posted July 14, 2012 1: Cuando usas un evento creado por un script, necesitas usar addEvent tambien.2: El argumento del jugador de ese evento no es 'thePlayer', es 'source' ( borrra 'thePlayer' del nombre de la funcion y remplazalo en las otras funciones con 'source' ). Volve a leer lo que dije. Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 pero si use al addEvent y tambien cambie el thePlayer por source Link to comment
~Zeus~ Posted July 14, 2012 Share Posted July 14, 2012 Creo que lo que quieres es esto .. https://community.multitheftauto.com/index.php?p=resources&s=details&id=3292 Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 mas o menos pero no quiero que diga zombie y tampoco quiero que se le va a los zombies solamente al slothbot y a nada mas en ese script se le ve la vida a los autos a los zombies y dice zombies arriba eso es lo que no me gusta Link to comment
Castillo Posted July 14, 2012 Share Posted July 14, 2012 borra 'thePlayer' del nombre de la funcion y remplazalo en las otras funciones con 'source' No hiciste todo, yo te dije que borrases del nombre de la funcion, no que lo remplazes por 'source', solo en las otras funciones tenias que remplazar. Link to comment
Plate Posted July 14, 2012 Author Share Posted July 14, 2012 Muchas gracias y se podria modificar el recurso que me paso zeus y hacerlo para el slothbot? por que tiene una parte en luaq y no se nada de luaq Link to comment
Castillo Posted July 15, 2012 Share Posted July 15, 2012 LuaQ = un script Lua compilado, no se puede editar. P.D: De nada. Link to comment
Recommended Posts