Jump to content

help again


Paplo

Recommended Posts

setTimer 
guiSetEnabled 

i hate this way

can i use getTickCount ?

its very simple

setTimer ( function() 
        guiSetEnabled( element, false ) 
end, 60000, 1 ) 

element: the picture what you want to disable for 60 seconds

i need to disable triggerServerEvent('SyncSound',localPlayer)

not the picture

Link to comment
  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

addEvent('ClientSyncSound',true) 
addEventHandler('ClientSyncSund',root, 
    function (  ) 
        guiSetEnabled (  GUIEditor.staticimage[2],false ) 
        setTimer ( guiSetEnabled,60000,1,GUIEditor.staticimage[2],true ) 
       if isElement ( sound ) then destroyElement ( sound ) sound = nil end 
        sound = playSound ( "1.mp3", false ) 
    end 
) 

ok i will if player click at image

server says wait 60 sc

can do this?

Link to comment

ok i will if player click at image

server says wait 60 sc

can do this?

addEvent('ClientSyncSound',true) 
addEventHandler('ClientSyncSund',root, 
    function (  ) 
        guiSetEnabled (  GUIEditor.staticimage[2],false ) 
        outputChatBox ( "* Wait 60 seconds", localPlayer, 255, 0, 0, true ) 
        setTimer ( guiSetEnabled,60000,1,GUIEditor.staticimage[2],true ) 
       if isElement ( sound ) then destroyElement ( sound ) sound = nil end 
        sound = playSound ( "1.mp3", false ) 
    end 
) 

Link to comment

ok i will if player click at image

server says wait 60 sc

can do this?

addEvent('ClientSyncSound',true) 
addEventHandler('ClientSyncSund',root, 
    function (  ) 
        guiSetEnabled (  GUIEditor.staticimage[2],false ) 
        outputChatBox ( "* Wait 60 seconds", localPlayer, 255, 0, 0, true ) 
        setTimer ( guiSetEnabled,60000,1,GUIEditor.staticimage[2],true ) 
       if isElement ( sound ) then destroyElement ( sound ) sound = nil end 
        sound = playSound ( "1.mp3", false ) 
    end 
) 

addEvent('s1',true) 
addEventHandler('s1',root, 
    function (  ) 
         if ( getTickCount ( ) - lastTick >= toWait ) then   -- Calculate how long it passed since last used and compare with required time to wait. 
       if isElement ( sound ) then destroyElement ( sound ) sound = nil end 
                           lastTick = getTickCount ( ) 
                          else 
                                       sound = playSound ( "1.mp3", false ) 
end 
end                                      
) 

i liked this way xD

Link to comment
local Group = 
    { 
        { 100000 }, 
    } 
  
addEventHandler ( "onClientGUIClick", guiRoot, 
    function ( ) 
        if ( source == GUIEditor.staticimage[2] ) then 
            local money = 0 
            if ( source == GUIEditor.staticimage[2] ) then 
                money = Group[1][1] 
            end 
            if getElementData ( source or GUIEditor.staticimage[2],'AntiSpam' ) == true then outputChatBox('Wait 60 Sec!') return end 
            if ( getPlayerMoney ( ) <= tonumber ( money ) ) then outputChatBox ( 'You Not Have Money', 255, 0, 0 ) return end 
                triggerServerEvent('SyncSound',localPlayer) 
        end 
    end 
) 
  
addEvent('s1',true) 
addEventHandler('s1',root, 
    function (  ) 
       if isElement ( sound ) then destroyElement ( sound ) sound = nil end 
        sound = playSound ( "1.mp3",false ) 
        setElementData ( GUIEditor.staticimage[2],'AntiSpam',true ) 
        setTimer ( setElementData,60000,1,GUIEditor.staticimage[2],'AntiSpam',false ) 
    end 
) 

Try this.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...