Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Porque eso que hiciste no tiene sentido, estas creando todas las imagenes como si la funcion no existiese. @Bc: La posicion debe ser absolute.
  2. function dxDrawGifImage ( x, y, w, h, path, iEnd, effectSpeed ) local gifElement = createElement ( "dx-gif" ) if ( gifElement ) then setElementData ( gifElement, "gifData", { x = x, y = y, w = w, h = h, imgPath = path, endID = iEnd, imgID = 1, speed = effectSpeed, tick = getTickCount ( ) } ) return gifElement else return false end end addEventHandler ( "onClientRender", root, function ( ) local currentTick = getTickCount ( ) for _, gif in ipairs ( getElementsByType ( "dx-gif" ) ) do local gifData = getElementData ( gif, "gifData" ) if ( gifData ) then if ( currentTick - gifData.tick >= gifData.speed ) then gifData.tick = currentTick gifData.imgID = ( gifData.imgID + 1 ) if gifData.imgID > gifData.endID then gifData.imgID = 1 end setElementData ( gif, "gifData", gifData ) end dxDrawImage ( gifData.x, gifData.y, gifData.w, gifData.h, string.format(gifData.imgPath,gifData.imgID) ) end end end ) gif = dxDrawGifImage ( 0.68, 0, 4.5, 3.55, "img/logo", 13, "png", 60 )
  3. Castillo

    Save team

    You get removed from the team after using the "/remove" command? if so, what happens after you reconnect and login again?
  4. Castillo

    Scripting

    I'll lock the topic, as many others of this member which turned into off-topic's.
  5. playersTouched = { } function incremento ( attacker, weapon, bodypart, loss ) if ( attacker and getElementType ( attacker ) == "ped" and getElementData ( attacker, "zombie" ) ) then playersTouched [ source ] = true end end addEventHandler ( "onPlayerDamage", getRootElement(), incremento ) setTimer ( function ( ) for player, _ in pairs ( playersTouched ) do setPedArmor ( player, ( getPedArmor ( player ) + 10 ) ) end end ,120000, 0 ) addEventHandler ( "onPlayerWasted", root, function ( ) playersTouched [ source ] = nil end ) El problema de pekio era que no quito al jugador de la tabla, nomas cambio el valor a 'false'.
  6. I don't understand what you are saying.
  7. No, ipairs se usa para las tablas con index.
  8. No se, lo acabo de probar y funciona perfectamente.
  9. Despues de que te toque un zombi?
  10. playersTouched = { } function incremento ( attacker, weapon, bodypart, loss ) if ( attacker and getElementType ( attacker ) == "ped" and getElementData ( attacker, "zombie" ) ) then playersTouched [ source ] = true end end addEventHandler ( "onPlayerDamage", getRootElement(), incremento ) setTimer ( function ( ) for player, _ in pairs ( playersTouched ) do setPedArmor ( player, ( getPedArmor ( player ) + 10 ) ) end end ,120000, 0 )
  11. Verifica si el atacante es un "ped" con getElementType y luego si es un zombi con getElementData.
  12. The name you are using is already being used by: delux-host.com, you stole their name.
  13. Usa: onPlayerDamage getElementType
  14. Le queres dar + 10 de armadura a todos los jugadores cada 2 minutos, es eso?
  15. It's down, just wait until it get's back online.
  16. You can't hurt with melee if you are outside of San Andreas map bounds.
  17. If it's too slow, it won't reach to set it before set the text ( if I'm right ), I think is better to set the IP as element data when they join the server, then just get it client side.
  18. Castillo

    Set Camera

    function Camera ( ) fadeCamera ( true ) end addEventHandler ( 'onClientResourceStart', resourceRoot, Camera )
  19. if ( zombiesLevels > 0 and zombieLevels < 21 ) then
  20. No, eso funciona con los zombies de nivel 20 o superior.
  21. addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( killer ) if ( killer and getElementType ( killer ) == "player" ) then local zombiesLevels = getElementData ( source, "level" ) or 0 if ( zombiesLevels >= 20 ) then exports.exp_system:addPlayerEXP ( killer, 300 ) end end end )
  22. bool isMoved = false El 'bool' no es necesario, y causaria que el script no funcione ( si no me equivoco ).
  23. Freeze the player before setting the camera, and unfreeze after reseting it back to the player.
×
×
  • Create New...