Jump to content

0xCiBeR

MTA Team
  • Posts

    1,673
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by 0xCiBeR

  1. Alguna idea de como eliminar esa accion de los zombies de matarte por atras=?...Xq lo saque.. pero generalmente se me pierden los zombies...Y otra cosa.. Me indican como hacer que cuando el zombie este cerca tuyo tire mas "Punches" o te pegue mas veces antes de volver a la anim de perseguimiento...? Asi son mas inteligentes y dificiles??? ...PLiss
  2. 0xCiBeR

    Ayudita

    Xq debes pasar el stream zombie a 0 (only creating zombies via createZombie)...x eso aveces te anda y aveces no...Xq geeralmente ya estas en el limite de zombies...En cambio si lo pones a 0 el stream..Solo los que tu creas se añadiran a la tabla de zombies totales--
  3. Bueno creo que todos conocen la anim lib de arc...para animar gui images....Quisiera saber...Como se puede hacer para que una imagen tiemble...usando esa libreria.... por las dudas aca les dejo la libreria... --[[ Client animation library by arc_ Version 1.0.0 Licence ---------------- You are free to modify this file and redistribute it with your changes. However, always mention that you changed it (and eventually what changes you made) and keep the original author, version number and licence intact. Selling this script or a derivative of it is not allowed. Documentation ---------------- Terminology - Animation: a sequence of phases that act on one or more elements and follow each other sequentially in time. Multiple animations can be running at the same time. All defined animations run in parallel. An animation is in fact one phase with several subphases (see below), with animation specific functions available. - Phase: a part of an animation sequence. A phase consists of a paramater that linearly goes from a given starting value to a given ending value, over the specified amount of time, and is applied to one certain element. While a phase is running, its callback function will be called onClientRender with the following arguments: phase.fn(element elem, float param, table phase) Specifying time and callback function is optional. If no time is specified but a function is, phase.fn(elem) will be called once. If no function is specified but a time is, the phase consists of simply waiting during that time, doing nothing. A phase can be run once, repeated multiple times or loop infinitely. Phases can also contain phases. In that case the parent phase consists of completing all child phases, in order. This allows you to f.e. make an element move left and right continuously: define a phase for moving it to the left, followed by a phase for moving it back to the right, and encapsulate these two phases in a parent phase that loops forever. Phases can be nested to arbitrary depth. The element a subphase works on is inherited from its parent phase (or, if the parent phase doesn't specify an element, from the grandparent, etc). Definition of a phase A phase is simply a table containing properties and (optionally) subphases. Available phase properties are: (the values for the properties are examples, not default values) phase = { from = 0, -- the starting value of the parameter to = 1, -- the ending value of the parameter [time = 1000,] -- the time (in ms) in which to go from start to end [fn = callback,] -- the function to call on each frame update [repeats = 5,] -- how many times to run this phase before going on to -- the next. defaults to 1 [subphase1,] -- optional subphases. if one or more of these are included, [subphase2,] -- only the "repeats" property is valid for this parent phase ... } Available functions anim = Animation.create(elem, phase1, phase2, ...) Creates and returns a new animation. This means nothing more than creating a new phase, putting the specified phases in it as subphases, and making the functions of the Animation class available to it. Once an animation is created, it is not yet running. anim = Animation.createAndPlay(elem, phase1, phase2, ...) Creates a new animation and immediately starts playing it. anim = Animation.createNamed(name, elem, ...) If an animation with the specified name exists, returns that animation. Otherwise creates a new named animation. You can look the animation up again later with Animation.getNamed(name). anim = Animation.createNamedAndPlay(name, elem, ...) Self explanatory. anim = Animation.getNamed(name) Returns the animation with the specified name if it exists, false otherwise. anim:play() Start playing a newly created animation or resume a paused animation. anim:pause() Pauses the animation. Resume it later with anim:play() or delete it with anim:remove(). anim:remove() Deletes the animation completely. It can not be resumed anymore. anim:isPlaying() Returns true if the animation is currently playing, false if not. Animation.playingAnimationsExist() Returns true if there is any animation that is currently playing. anim:addPhase(phase3), phase2:addPhase(phase3) Appends a new subphase to the animation or phase. Can be done while the animation is playing. Note that to be able to use phase2:addPhase(), phase2 first has to be processed (default values filled in, made part of the Phase class) by being passed as an argument to Animation.create[AndPlay] or addPhase. Examples Fade in a picture: local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, { from = 0, to = 1, time = 2000, fn = guiSetAlpha }) Fade in a picture using a preset (for more presets, see the end of this file): local pict = guiCreateStaticImage(...) Animation.createAndPlay(pict, Animation.presets.guiFadeIn(2000)) Move a label to the right while fading it in: local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay(label, Animation.presets.guiMove(200, 100, 2000)) Animation.createAndPlay(label, Animation.presets.guiFadeIn(2000)) Move a label left and right forever, without presets: function guiSetX(elem, x) local curX, curY = guiGetPosition(elem, false) guiSetPosition(elem, x, curY, false) end local label = guiCreateLabel(10, 100, 150, 20, 'Test', false) Animation.createAndPlay( label, { repeats = 0, { from = 10, to = 200, time = 2000, fn = guiSetX }, { from = 200, to = 10, time = 2000, fn = guiSetX } } ) ]]-- Phase = {} Phase.__index = Phase Animation = setmetatable({}, { __index = Phase }) Animation.__index = Animation Animation.collection = {} function Animation.create(elem, ...) local anim = setmetatable({ elem = elem, ... }, Animation) anim:_setup() return anim end function Animation.createAndPlay(elem, ...) local anim = Animation.create(elem, ...) anim:play() return anim end function Animation.createNamed(name, elem, ...) local anim = Animation.getNamed(name) or Animation.create(elem, ...) anim.name = name return anim end function Animation.createNamedAndPlay(name, elem, ...) local anim = Animation.createNamed(name, elem, ...) anim:play() return anim end function Animation.getNamed(name) local i, anim = table.find(Animation.collection, 'name', name) return i and anim end function Animation:isPlaying() return self.playing or false end function Animation.playingAnimationsExist() return table.find(Animation.collection, 'playing', true) and true end function Animation:play() if self.playing then return end if not table.find(Animation.collection, self) then table.insert(Animation.collection, self) end if not Animation.playingAnimationsExist() then addEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = true end function Animation:pause() self.playing = false if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end end function Animation:remove() table.removevalue(Animation.collection, self) if not Animation.playingAnimationsExist() then removeEventHandler('onClientRender', getRootElement(), updateAnim) end self.playing = false end function Phase:_setup(parent) self.parent = parent if self[1] then for i,phase in ipairs(self) do if type(phase) == 'function' then phase = { fn = phase } self[i] = phase end setmetatable(phase, Phase) phase:_setup(self) end self.curphase = 1 elseif self.time then self.from = self.from or 0 self.to = self.to or 1 self.speed = (self.to - self.from) / self.time end self.repeats = self.repeats
  4. 0xCiBeR

    outputChatBox

    lol men...pero ya le pase el script que anda.... ._. ademas solo te saldria a uno mismo eso... ._. es lo que le dije
  5. 0xCiBeR

    outputChatBox

    lol @Sasuke... de que serviria eso...Ni siquiera saldra Rojo...El que yo le pase ya esta bien ._. solo debe cambiar el Hex a el color que quiera o ponerlo a false y editar el r,g,b
  6. pues no hay ninguna herramienta? ._.
  7. Hisiste un panel?..Pues con isObjectInACLGroup y triggerClientEvent (para la apertura del panel)..
  8. 0xCiBeR

    outputChatBox

    Igualmente solo te apareceria a vos ese mensaje...Si quieres que le aparezca a todos usa un triggerServerEvent..
  9. 0xCiBeR

    outputChatBox

    Lol disculpa..estoy medio dormido ...asi seria el codigo..te deberia andar perfectoo... function blow() for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then blowVehicle ( vehicle, true ) outputChatBox(getPlayerName(source).." #0099FFToco el agua y exploto!", 255, 255, 255, true) end end end addEventHandler ( "onClientPlayerWasted",getRootElement(), blow)
  10. 0xCiBeR

    outputChatBox

    Pues probe tu script y no me funciona...El problema es que ni siquiera me aparece el texto...
  11. 0xCiBeR

    outputChatBox

    pon asi: function blow() for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then blowVehicle ( vehicle, true ) outputChatBox(getPlayerName(source).." #0099FFToco el agua y exploto!",getRootElement(), 255, 255, 255, true) end end end addEventHandler ( "onClientPlayerWasted",getRootElement(), blow)
  12. Alguien sabe como puedo obtener la posicion dando click o algo, de el cliente...? Para saber posicionar un logo? Gracias
  13. lol men... busca esa funcion handleHitPickup y remplaza toda la funcion por la que te di...
  14. How do i make my handilings create via hedit, remain permenent every time i start the resource? For every player??
  15. 0xCiBeR

    Ayuda race

    Gracias igual ya lo solucione agregando el playSound cuando se activa la imagen de travelling...Gracias solid
  16. 0xCiBeR

    Ayuda race

    Hola como podria hace, para que cuando un mapa empieze a cargar, me reproduzca un sonido? Grax
  17. Haber espera esper...Has quitado el addVehicleUpgrade... LOOOL Seria asi creo:(Probado y funciona)(Lo saque de mi script de race e.e ) function handleHitPickup(pickup) if pickup.type == 'vehiclechange' then if pickup.vehicle == getElementModel(g_Vehicle) then return end g_PrevVehicleHeight = getElementDistanceFromCentreOfMassToBaseOfModel(g_Vehicle) alignVehicleWithUp() setElementModel(g_Vehicle, pickup.vehicle) vehicleChanging(g_MapOptions.classicchangez, pickup.vehicle) playSound("audio/pickup.wav" ) elseif pickup.type == 'nitro' then addVehicleUpgrade(g_Vehicle, 1010) playSound("audio/nitro.wav" ) elseif pickup.type == 'repair' then fixVehicle(g_Vehicle) playSound("audio/repair.wav") end triggerServerEvent('onPlayerPickUpRacePickupInternal', g_Me, pickup.id, pickup.respawn) end
  18. Tambien se me ocurrio los timers, pero sabes donde estan?...Xq solamente encontre los que cancelan el Zomb_punch??
  19. eso te reproducira todos esos sonidos...Primero no se entendera nada y ademas, generaras lag masivo ._. uso 1 solo sonido por tipo
  20. Hola.! Alguna idea de como hacer que los zombies sean mas inteligentes?...Xq los del Zday script, simplemente son poco presisios..Aveces se pierden, o estan cerca tuyo pero no te pegan...? Alguna idea como mejorar eso?
  21. Capaz es lo que dice fran...Apaga el freeroam y el spawnmanager..
  22. prueba usar onPlayerConnect
  23. 0xCiBeR

    Ayudita

    Lol....Lo tenia puesto server side... pero escrito asi serrver gracias solid y gracias a los demas e.e
  24. Te sigue dando el mismo error?
×
×
  • Create New...