Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. function getRaceAlivePlayers ( ) local players = 0 for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "state" ) == "alive" ) then players = ( players + 1 ) end end return players end
  2. We don't give support with leaked scripts. Topic locked.
  3. You can't add new models, is that hard to understand?
  4. Castillo

    export

    Igual que el primero...
  5. Castillo

    export

    Si, pero te falta devolver el valor: function getPlayerGang ( player ) return getElementData ( player , "gang") end function exportedOtherScript ( thePlayer ) gang = export.gang_system:getPlayerGang ( thePlayer ) end
  6. Castillo

    export

    Los pasas igual que en cualquier funcion.
  7. No, you can't add new models.
  8. Castillo

    export

    Es muy simple, en el meta.xml pones asi: function="tuFuncion" type="elTipoDeScript ( client o server )" /> Y luego para llamarla es asi: exports [ "nombreDelRecurso" ]:tuFuncion ( ) Return: http://www.lua.org/pil/4.4.html
  9. Castillo

    problema

    Pone: if isElement ( slothbot ) then -- El codigo tuyo aqui. end dentro de la funcion del timer.
  10. Castillo

    dxDrawText

    The problem is on your 'if' to check for clicked position. I got a question, why don't you just use GUI images?
  11. Castillo

    dxDrawText

    Where is "x" defined?
  12. Castillo

    dxDrawText

    Try debugging your script, add outputs after 'if''s' and so on.
  13. Castillo

    dxDrawText

    Do what I said above.
  14. function nametagColorChangeManual ( thePlayer, commandName, r, g, b ) setPlayerNametagColor ( thePlayer, r, g, b ) end addCommandHandler ( "namecolormanual", nametagColorChangeManual ) function namecolorred ( thePlayer ) executeCommandHandler ( "namecolormanual", thePlayer, 255, 0, 0 ) end addCommandHandler ( "namecolor-red", namecolorred )
  15. Castillo

    dxDrawText

    "onClientPlayerJoin" is only triggered when a remote player joins, use "onClientResourceStart" instead.
  16. How do you set the class? element data?
  17. You can use setElementPosition, or attach the marker to an invisible object and move the object then.
  18. This should be similar to what you want: viewtopic.php?f=91&t=56089
  19. Castillo

    problema

    function kill ( slothbot ) Borra slothbot de ahi.
  20. Castillo

    Expected

    You aren't passing the "slothbot" argument anywhere.
  21. Yo ucan export a function that removes it, then use the exported function.
×
×
  • Create New...