Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Si, lo probe en mi servidor local y funciono.
  2. Castillo

    Rank

    En .xml Nada quever. Lee sobre tablas en lua.org.
  3. Castillo

    Rank

    Podes poner a todos los jugadores con sus puntos en una tabla, y luego usar: table.sort
  4. Lo que paso es que alguien modifico mi funcion ( dxDrawGifImage ) y la modifico mal, porque ya no funciona. function dxDrawGifImage ( x, y, w, h, path, iStart, iType, effectSpeed ) local gifElement = createElement ( "dx-gif" ) if ( gifElement ) then setElementData ( gifElement, "gifData", { x = x, y = y, w = w, h = h, imgPath = path, startID = iStart, imgID = iStart, imgType = iType, speed = effectSpeed, tick = getTickCount ( ) } ) return gifElement else return false end end addEventHandler ( "onClientRender", root, function ( ) local currentTick = getTickCount ( ) for index, 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 ( fileExists ( gifData.imgPath .."".. gifData.imgID ..".".. gifData.imgType ) ) then gifData.imgID = gifData.imgID setElementData ( gif, "gifData", gifData ) else gifData.imgID = gifData.startID setElementData ( gif, "gifData", gifData ) end end dxDrawImage ( gifData.x, gifData.y, gifData.w, gifData.h, gifData.imgPath .."".. gifData.imgID ..".".. gifData.imgType ) end end end ) gif = dxDrawGifImage ( 769, 175, 193, 145, "img/logo", 1, "png", 60 ) Funca perfecto.
  5. We won't help you with scripts that aren't yours.
  6. Is the colorCoded argument of dxDrawText set to 'true'?
  7. Where is the variable 'points' defined?
  8. MySQL is server side only, you can't use it client side.
  9. Castillo

    Needed help

    That's not required, you can get the amount of players by using: getElementsWithinColShape with: getElementColShape
  10. Subi el recurso en un .zip a mediafire.com y postea el link, asi lo pruebo.
  11. Cuando usas DirectX, tenes que usar posiciones en "absolute". Una posicion absolute seria asi: 500, 500, 100, 200 Una en relative seria algo asi: 0.05, 0.8, 0.65, 0.15
  12. Castillo

    Una pregunta

    Si, es posible, usa la funcion: guiCreateFont o dxCreateFont Una es para GUI y la otra para DirectX ( DX ).
  13. If you set it correctly, then it should work the check for when quit.
  14. When they log in via the login GUI, set them a special data with element data maybe ( setElementData ) and then check it when quit ( getElementData ).
  15. Yes, it is, you can make: nItemFound [ source ] = { } Then do: nItemFound [ source ] [ 1 ] = 0
  16. Topic moved to: "Support for MTA:SA 1.x > Linux-Server".
  17. You can use tables: --SERVER-SIDE local nItemFound = { } --------------------- function onPlayerPickupItem ( thePickup ) if ( not nItemFound [ source ] ) then nItemFound [ source ] = 0 end outputChatBox ( "* You found a item. Total itens found: ".. nItemFound [ source ], source ) nItemFound [ source ] = ( nItemFound [ source ] + 1 ) end addEventHandler ( "onPlayerPickupHit", getRootElement(), onPlayerPickupItem ) What I did is store the player in the table.
  18. Decis al entrar al servidor, porque no usas onPlayerLogin, usas onPlayerJoin.
  19. Que te aparece exactamente?
  20. Simplemente consegui la posicion en absolute.
  21. You declared your 'Guy' variable local, which means it can only be accessed inside 'StripBitches' function. local Guy = createPed ( 0, 2230.2053, -1107.5839, 1050.8828, 180 ) Should be: Guy = createPed ( 0, 2230.2053, -1107.5839, 1050.8828, 180 )
  22. 'source' of onClientGUIClick is the button clicked. Where is 'Guy' defined? Also, if you change the skin client side, only you will see it changed.
×
×
  • Create New...