Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. "race/race_client.lua" @NOD: El se referia al mapa que estan jugando ( el que aparece en blanco ahi abajo ).
  2. Castillo

    Panel

    A eso me refiero, pero tambien cuando el recurso inicia.
  3. Castillo

    Panel

    Pero vas a tener que poner el pais tambien cuando inicia el recurso para todos los jugadores, porque si no tendran que reconectar.
  4. Castillo

    Panel

    Eso es porque estas usando el evento: "onResourceStart" que no tiene ningun argumento de jugador.
  5. You want to save player position when player quits the server and load them when he joins back?
  6. Castillo

    i cant update gta sa

  7. Castillo

    Panel

    Es: "onClientGUIClick", no "onClientGuiClick". Pusiste con minusculas: "ui".
  8. Source code removed. Topic locked.
  9. Podes usar: call o exports.
  10. Copy the code again, it works now ( tested ).
  11. As I said, it'll update once every 3 seconds.
  12. You're welcome. P.S: The "MTA Pro" group is for these who donate.
  13. function getAlivePlayers ( ) local players = { } for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementHealth ( player ) > 0 ) then table.insert ( players, player ) end end return players end label = guiCreateLabel ( 0, 0.9525, 1, 1, "ALIVE: ".. #getAlivePlayers ( ), true ) guiSetFont ( label, "sa-header" ) guiLabelSetColor ( label, 255, 175, 0 ) setTimer ( function ( ) guiSetText ( label, "ALIVE: ".. #getAlivePlayers ( ) ) end ,3000, 0 ) That'll update it every 3 seconds.
  14. Post your full code.
  15. Maybe if you would tell us what is wrong with it?
  16. You're welcome.
  17. X: 389.99 Y: 173.72 Z: 1008.38 Interior ID: 3
  18. viewtopic.php?f=91&t=47788
  19. function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end That'll draw the text with black borders.
  20. Click the link which redirects to the MTA wiki, there's an example.
  21. You're welcome.
  22. Castillo

    trigger

    Ok. You're welcome.
  23. function convertTime ( ms ) if ( ms and type ( ms ) == "number" ) then local mins = math.floor ( ms / 60000 ) local hours = math.floor ( mins / 60 ) local secs = math.floor ( ( ms / 1000 ) % 60 ) return string.format ( "%s:%s:%s", hours, ( mins - hours * 60 ), secs ) end end
  24. Castillo

    trigger

    It's working now?
  25. Castillo

    trigger

    See? you forgot to copy the source code of: "getAlivePlayers".
×
×
  • Create New...