IIIIlllllIII Posted November 16, 2011 Share Posted November 16, 2011 hi guys i try to make the button on the player clicked displayed the button 1 minute and after 1 minute the player can clicking the button but how that work i try to make it function onGuiClick (button, state, absoluteX, absoluteY) if ( source == weapButton_25 ) then triggerServerEvent("button", getLocalPlayer()) editbox = guiCreateEdit(11, 41, 241, 22, "", false, shopwinow) if source == editbox then outputChatBox("the button has been displayed") setTimer ( onGuiClick, editbox ,89999 ) end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) how i displayed the button and lett him back agine after 1 minute Link to comment
TAPL Posted November 16, 2011 Share Posted November 16, 2011 nice english haha displayed? or disabled? https://wiki.multitheftauto.com/wiki/GuiSetEnabled Link to comment
IIIIlllllIII Posted November 17, 2011 Author Share Posted November 17, 2011 nice english hahadisplayed? or disabled? https://wiki.multitheftauto.com/wiki/GuiSetEnabled ياخي لاتدقق ترا كتبت الكلمه بدون ما اترجم P OR B SAME MEANS Link to comment
Charlie_Jefferson Posted November 17, 2011 Share Posted November 17, 2011 Not really... Displayed means that the thing is shown, however disabled means it doesn't show up until you tell it to. Also, your Arab(?) makes me think your insulting someone in your language . Link to comment
Al3grab Posted November 17, 2011 Share Posted November 17, 2011 -- Making Your Gui Should'nt be with the onGuiClick Event ,, so : editbox = guiCreateEdit(11, 41, 241, 22, "", false, shopwinow) -- make your Gui guiSetEnabled(editbox ,false) -- Set it Disabled -- then set your event handler function onGuiClick (button, state, absoluteX, absoluteY) if ( source == weapButton_25 ) then triggerServerEvent("button", getLocalPlayer()) -- Start if ( source == editbox ) then -- on Clicked function Enableit() -- enabling it guiSetEnabled(editbox ,true) -- set it to enabled outputChatBox("the button has been displayed") -- output ur msg to chat end --- end ! setTimer(Enableit,60*1000,1) -- Set your timer -- END end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 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