Jump to content

furruz

Members
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

0 Neutral

About furruz

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ya lo hice pero no me sirve. Pues una vez ejecuta toggleControl("fire",false) ya no salta el event onClientPlayerWeaponFire. Asi que cuando uno añade municion, el control del disparo sigue desactivado. He pensado en hacer que el objeto cargador active el control..pero su funcionamiento podria ser un tanto bruto..
  2. No se si es cosa del MTA en sí, o del MTA Paradise de Mabako, pero cuando gasto la ultima bala de un arma,esta parece desaparecer; aunque aun funciona el setWeaponAmmo. El problema es que el MTA Paradise no guarda ese arma con municion zero.. He intentado usar este codigo cliente para evitar que dispare la ultima bala. Funciona todo menos el cancelEvent() function Ultimabala() local ammo = getPedTotalAmmo(localPlayer) if ammo <= 4 then outputChatBox( "Reserva tu ultima bala para no perder el arma.", 255, 0, 0 ) end if ammo == 1 then
  3. im thinking about making the hunger script by my own (serverside based). The hunger script i use is workin on client.
  4. my codes: [Client] function onQuitGame( player, hambre1 ) local hambre1 = exports.hunger:getHungerState(player) triggerServerEvent ( "guardarhambre", getLocalPlayer(), hambre1 ) end addEventHandler( "onClientPlayerQuit", getRootElement(), onQuitGame ) [server] function hambreHandler ( player, hambre1 ) hambre = hambre1 --setElementData(player,"hambre",hambre1) exports.sql:query_free( "UPDATE characters SET hunger = "..hambre.." WHERE characterID = " .. tonumber( getCharacterID( player ) ) ) end addEvent( "guardarhambre", true ) addEve
  5. I'm working on a hunger script on MTA Paradise. I want to save on SQL the value of the hunger bar when the player quits. I got the function to get the bar value but it is only Client-side. How can i pass the bar value information to the server to save it on SQL?
  6. Well i have seen a little and i have thinked bout use exported functions. I'm tryin it CLIENT hamburgerPositions = { {450,-83,999.55,4} } -- The positions for the hamburger, in the style: x,y,z,interior --[[ This is the hunger script. You can add hamburgers by adding it in hamburgerPositions. It works easy, just a after it, and filling in! {x,y,z,interiorID} When it isn't the last position, it needs a "," after it ]]-- -- DONT CHANGE ANYTHING AFTER THIS WITHOUT KNOWLEDGE! addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()), function ()
  7. thanks! i have solved it with another method but i'm interested in export a pair of client functions for hunger script. I will post it now.
  8. Hi i want to use removeEventHandler to remove an event from another Resource (players). The event i want to remove is clientside; in respawn_c.lua. How can i use it? included in server code: removeEventHandler( "onClientRender", hitElement, drawRespawnText) included in xml: <include resource="players"/>
  9. (sorry for double post) It is posible to take this script http://community.multitheftauto.com/index.php?p=resources&s=details&id=906 hamburgerPositions = { {372.82,-65.68,1001.51,10}, {380.44,-8.65,1001.85,9}, {379.42,-119.65,1001.49,5} } -- The positions for the hamburger, in the style: x,y,z,interior --[[ This is the hunger script. You can add hamburgers by adding it in hamburgerPositions. It works easy, just a after it, and filling in! {x,y,z,interiorID} When it isn't the last position, it needs a "," after it ]]-- -- DONT CHANGE ANYTHING AFTER THIS WITHOUT KN
  10. really interesting, i will see it. thnx I want to make the script serverside to allow food items to increase hunger Edited the code in english
  11. i'm sorry but i dont know what is Arma 2.. I'm tryin to set up a little Zombie survival Roleplay server to play with some friends. I use code from this website and forums. PD: this? http://www.arma2.com/home_en.html
  12. yes im using zday script
  13. Well i have seen a little and i have thinked bout use exported functions. I'm tryin it CLIENT hamburgerPositions = { {450,-83,999.55,4} } -- The positions for the hamburger, in the style: x,y,z,interior --[[ This is the hunger script. You can add hamburgers by adding it in hamburgerPositions. It works easy, just a after it, and filling in! {x,y,z,interiorID} When it isn't the last position, it needs a "," after it ]]-- -- DONT CHANGE ANYTHING AFTER THIS WITHOUT KNOWLEDGE! addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()), function ()
  14. final code por stamina system using exp_system (thnx to Castillo): (CLIENT) maxstamina = 10 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function ( ) local level = tonumber ( getElementData ( localPlayer, "level" ) or 0 ) maxstamina = ( level * 10 ) setTimer ( checkKey, 700, 0 ) setTimer ( updateStamina, 1000, 0 ) end ) stamina = maxstamina function checkKey ( ) if ( getControlState ( "sprint" ) ) and ( stamina ~= 0 ) then stamina = ( s
×
×
  • Create New...