-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I don't understand what do you want.
-
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.
-
A timer for what exactly? to trigger the event?
-
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.
-
You're welcome .
-
Is not even updating the 'Wins' element data?
-
This line: addEventHandler("setGUI", resourceRoot, setGUI) Should be: addEventHandler("setGUI", root, setGUI)
-
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
-
Which means the script is not really saving anything.
-
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.
-
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.
-
Enable the colorCoded argument at dxDrawText and then use HEX colors.
-
No le pasa nada que yo sepa.
-
Instead of: setAccountData(acc, wins) It should be: setElementData ( source, "Wins", wins )
-
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 )
-
El valhalla se hizo "publico" ilegalmente porque los que lo crearon no fueron los que lo empezaron a distribuir.
-
Yes, you have to change "5000".
-
El valhalla es ilegal, cualquier tema relacionado a ayuda con el sera borrado o bloqueado.
-
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.
-
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 )
-
Copia el codigo que puse y listo.