Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Spoiler

    Decis el upgrade de Spoiler? o un spoiler a los coches que no soportan los upgrades?
  2. I don't understand what do you want.
  3. He's talking about the interface of lil toady's spectator admin panel. You can add this: function aSpectator.CloseInterface ( ) if ( isElement ( aSpectator.Actions ) ) then guiSetVisible ( aSpectator.Actions, false ) end if ( isElement ( aSpectator.Players ) ) then guiSetVisible ( aSpectator.Players, false ) end if ( isElement ( aSpectator.Next ) ) then guiSetVisible ( aSpectator.Next, false ) end if ( isElement ( aSpectator.Prev ) ) then guiSetVisible ( aSpectator.Prev, false ) end showCursor ( false ) end to: "admin/client/gui/admin_spectator.lua" And then execute it however you want.
  4. Castillo

    Check data

    Mind telling us what was it?
  5. A timer for what exactly? to trigger the event?
  6. Castillo

    Check data

    function DestructionWin ( vehicle ) local alivePlayers = getAlivePlayers ( ) if ( #alivePlayers == 1 ) then outputChatBox ( "Passed check #1" ) if isElement ( alivePlayers[1] ) then outputChatBox ( "Passed check #2" ) local account = getPlayerAccount ( alivePlayers[1] ) if isGuestAccount ( account ) then return end outputChatBox ( "Passed check #3" ) local count = ( tonumber ( getAccountData ( account, "Wins" ) ) or 0 ) + 1 setAccountData ( account, "Wins", count ) setElementData ( alivePlayers[1], 'Wins', count ) --outputChatBox ( "#FFA824The player " .. getPlayerName( alivePlayers[1] ) .. " won!", root, 255, 255, 255, true ) end else local account = getPlayerAccount ( source ) if isGuestAccount ( account ) then return end local loses = ( tonumber ( getAccountData( account,"Deaths" ) or 0 ) ) + 1 setAccountData ( account, "Deaths", loses ) setElementData ( source, 'Deaths', loses ) end end Post here what does it output to chat.
  7. Castillo

    Check data

    Is not even updating the 'Wins' element data?
  8. This line: addEventHandler("setGUI", resourceRoot, setGUI) Should be: addEventHandler("setGUI", root, setGUI)
  9. Castillo

    Check data

    function DestructionWin ( vehicle ) local alivePlayers = getAlivePlayers ( ) if ( #alivePlayers == 1 ) then if isElement ( alivePlayers[1] ) then local account = getPlayerAccount ( alivePlayers[1] ) if isGuestAccount ( account ) then return end local count = ( tonumber ( getAccountData ( account, "Wins" ) ) or 0 ) + 1 setAccountData ( account, "Wins", count ) setElementData ( alivePlayers[1], 'Wins', count ) --outputChatBox ( "#FFA824The player " .. getPlayerName( alivePlayers[1] ) .. " won!", root, 255, 255, 255, true ) end else local account = getPlayerAccount ( source ) if isGuestAccount ( account ) then return end local loses = ( tonumber ( getAccountData( account,"Deaths" ) or 0 ) ) + 1 setAccountData ( account, "Deaths", loses ) setElementData ( source, 'Deaths', loses ) end end
  10. Castillo

    Check data

    Which means the script is not really saving anything.
  11. Castillo

    Check data

    function onPlayerLogin ( _, acc ) if ( acc ) then local wins = tonumber ( getAccountData ( account, "Wins" ) ) or 0 setElementData ( source, "Wins", wins ) end end addEventHandler ( "onPlayerLogin",root, onPlayerLogin ) That's easier.
  12. Castillo

    Check data

    Try adding a debug output to see what 'wins' return when you login. @Hunterix: Is both the same thing, it won't make any difference.
  13. Enable the colorCoded argument at dxDrawText and then use HEX colors.
  14. Castillo

    table

    No podes usar una tabla en el server side si la creaste client side, a menos que la envies claro.
  15. Castillo

    Check data

    Instead of: setAccountData(acc, wins) It should be: setElementData ( source, "Wins", wins )
  16. That's because you binded it to command "music", not to "toggleSong" function. local musicStream = "http://www.181.fm/winamp.pls?station=181-power&style=mp3&description=Power%20181%20(Top%2040)&file=181-power.pls" function onResourceStart ( ) sound = playSound ( musicStream, true ) end function makeRadioStayOff ( ) setRadioChannel ( 0 ) cancelEvent ( ) end function toggleSong ( ) removeEventHandler ( "onClientRender", root, renderText ) if ( isTimer ( hideTimer ) ) then killTimer ( hideTimer ) end if not songOff then setSoundVolume ( sound, 0 ) songOff = true removeEventHandler ( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) addEventHandler ( "onClientRender", root, renderText ) hideTimer = setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderText ) end ,5000, 1 ) else setSoundVolume ( sound, 1 ) songOff = false setRadioChannel ( 0 ) addEventHandler ( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) addEventHandler ( "onClientRender", root, renderText ) hideTimer = setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderText ) end ,5000, 1 ) end end function renderText ( ) dxDrawText ( "[RADIO] Radio is switched ".. ( songOff and "off" or "on" ), 0, 0, 5, 5, tocolor ( 0, 0, 0, 255 ), 1, "default-bold" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onResourceStart ) addEventHandler ( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) addEventHandler ( "onClientPlayerVehicleEnter", root, makeRadioStayOff ) bindKey ( "R", "down", toggleSong )
  17. El valhalla se hizo "publico" ilegalmente porque los que lo crearon no fueron los que lo empezaron a distribuir.
  18. Yes, you have to change "5000".
  19. El valhalla es ilegal, cualquier tema relacionado a ayuda con el sera borrado o bloqueado.
  20. local musicStream = "http://www.181.fm/winamp.pls?station=181-power&style=mp3&description=Power%20181%20(Top%2040)&file=181-power.pls" function onResourceStart ( ) sound = playSound ( musicStream, true ) end function makeRadioStayOff ( ) setRadioChannel ( 0 ) cancelEvent ( ) end function toggleSong ( ) removeEventHandler ( "onClientRender", root, renderText ) if ( isTimer ( hideTimer ) ) then killTimer ( hideTimer ) end if not songOff then setSoundVolume ( sound, 0 ) songOff = true removeEventHandler ( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) addEventHandler ( "onClientRender", root, renderText ) hideTimer = setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderText ) end ,5000, 1 ) else setSoundVolume ( sound, 1 ) songOff = false setRadioChannel ( 0 ) addEventHandler ( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) addEventHandler ( "onClientRender", root, renderText ) hideTimer = setTimer ( function ( ) removeEventHandler ( "onClientRender", root, renderText ) end ,5000, 1 ) end end function renderText ( ) dxDrawText ( "[RADIO] Radio is switched ".. ( songOff and "off" or "on" ), 0, 0, 5, 5, tocolor ( 0, 0, 0, 255 ), 1, "default-bold" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onResourceStart ) addEventHandler ( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) addEventHandler ( "onClientPlayerVehicleEnter", root, makeRadioStayOff ) addCommandHandler ( "radio", toggleSong ) After 5 seconds when shown, it'll hide it.
  21. objeto = createObject ( 980, 96.599998474121, 1921.4000244141, 20.89999961853, 0, 0, 90 ) addCommandHandler ( "puerta", function ( ) moveObject ( objeto, 50000, 96.599998474121, 1921.4000244141, 15.89999961853 ) end ) addCommandHandler ( "puerta", function ( ) moveObject ( objeto, 5000, 96.599998474121, 1921.4000244141, 20.89999961853 ) end )
  22. Copia el codigo que puse y listo.
×
×
  • Create New...