Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. If 'accountname' is defined, then it should work.
  2. Eso no tiene sentido. Hacelo todo client side.
  3. Castillo

    a question

    You got a typo there, at line 9.
  4. https://wiki.multitheftauto.com/wiki/Sl ... tBotFollow
  5. Castillo

    Get time

    You're welcome.
  6. You must use the get function ( server side only ). What you can do is, send get the value, then send it to the client side along with the message.
  7. Castillo

    Get time

    You mean get the value of "time" setting? if so, then just do: local time = tonumber ( string.sub( get ( "time" ), 1, 2 ) ) or 0
  8. Castillo

    Ayuda con HUD

    function hud ( ) local vidajugador = getElementHealth ( localPlayer ) if ( not Vida ) then Vida = guiCreateStaticImage ( 60, 570, vidajugador, 10, "imagenes/ring360.png", false ) outputChatBox ( "Creando imagen" else guiSetSize ( Vida, vidajugador, 10, false ) outputChatBox ( "Cambiando de tamaño" ) end end addEventHandler ( "onClientPlayerDamage", localPlayer, hud ) Usa eso y fijate que dice en el chat cuando te quitan vida.
  9. Castillo

    Ayuda con HUD

    Se puede hacer todo client side. function hud ( ) local vidajugador = getElementHealth ( localPlayer ) if ( not Vida ) then Vida = guiCreateStaticImage ( 60, 570, vidajugador, 10, "imagenes/ring360.png", false ) else guiSetSize ( Vida, vidajugador, 10, false ) end end addEventHandler ( "onClientPlayerDamage", localPlayer, hud ) Lo que hice fue: verificar si la imagen ya exista, porque si lo haces como lo intentaste vos, creara una imagen cada vez, asi que lo que hace mi script es verificar si existe, y si existe, le cambia el tamaño, y si no, la crea.
  10. Castillo

    Ayuda con HUD

    Que estas intentando hacer?
  11. Esta puesto como server side, osea que deberia funcionar. Estando en el juego, escribi esto en el chat: /debugscript 3. Luego reinicia el recurso y fijate si salta algun error.
  12. Postea el contenido del archivo meta.xml.
  13. Lo pusiste como server side?
  14. Castillo

    Help script

    Seems like you have a custom chat system, so cancelling the message doesn't make any effect.
  15. function Crearbot ( ) Sobrevivientes = getTeamFromName ( "Sobrevivientes") Guardia1 = exports [ "slothbot" ]:spawnBot ( 2174.55078125, -1764.2509765625, 19.367008209229, 285, 0, 0, 320.17120361328, Sobrevivientes, 34 ) end addEventHandler ( "onResourceStart", resourceRoot, Crearbot )
  16. Castillo

    Help script

    Sorry, I made a typo, copy the code again.
  17. Como va a aparecer si nunca estas ejecutando la funcion "Crearbot"?
  18. Castillo

    Help script

    addEventHandler ( "onPlayerChat", getRootElement(), function ( message,messageType ) if ( message == "!reglas" ) then outputChatBox ( "* #FF80001) #0080FFmessage 1",getRootElement(), 255, 255, 255, true ) outputChatBox ( "* #FF80002) #0080FFmessage 2",getRootElement(), 255, 255, 255, true ) outputChatBox ( "* #FF80003) #0080FFmessage 3",getRootElement(), 255, 255, 255, true ) outputChatBox ( "* #FF80004) #0080FFmessage 4",getRootElement(), 255, 255, 255, true ) outputChatBox ( "* #FF80005) #0080FFmessage 5",getRootElement(), 255, 255, 255, true ) outputChatBox ( "* #FF80006) #0080FFmessage 6",getRootElement(), 255, 255, 255, true ) local r, g, b = getPlayerNametagColor ( source ) outputChatBox ( getPlayerName ( source ) ..": #FFFFFF".. message, root, r, g, b, true ) cancelEvent ( ) end end )
  19. Castillo

    Help script

    Cancel the original message using: cancelEvent, then just send anothr message using outputChatBox.
  20. Castillo

    Help script

    You can cancel the original message and send it after all the other messages.
  21. myonlake is right, we don't give support with leaked scripts. Topic locked.
×
×
  • Create New...