Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 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
Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 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
iMr.3a[Z]eF Posted June 19, 2013 Share Posted June 19, 2013 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
Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 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 Link to comment
Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 thank you all for help me ^^ bye bey Link to comment
iPrestege Posted June 19, 2013 Share Posted June 19, 2013 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
iMr.3a[Z]eF Posted June 19, 2013 Share Posted June 19, 2013 the scripter have a way to scripting, but he do it correctly and properly and Coordinator Link to comment
iMr.3a[Z]eF Posted June 19, 2013 Share Posted June 19, 2013 thank you all for help me ^^bye bey any time dude is your script works?! Link to comment
Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 thank you all for help me ^^bye bey any time dude is your script works?! yes ty Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now