adward Posted October 21, 2011 Posted October 21, 2011 (edited) ______________________ Edited October 22, 2011 by Guest
Blaawee Posted October 21, 2011 Posted October 21, 2011 same person viewtopic.php?f=91&t=36599 ^^ Catch You Duuude
Castillo Posted October 21, 2011 Posted October 21, 2011 -- client side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(234,165,422,347,"console-command",false) guiSetVisible (GUIEditor_Window[1], false) GUIEditor_Button[1] = guiCreateButton(18,59,381,94,"command-1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(30,200,367,90,"command-2",false,GUIEditor_Window[1]) bindKey ( "F2" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"20") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"30") end end) -- server side: addEvent("executeACommand",true) addEventHandler("executeACommand",root, function (client, action) executeCommandHandler("vote", client, "arena ".. tostring(action)) end)
adward Posted October 22, 2011 Author Posted October 22, 2011 Solidsnake14 Thank you very much its work now thank
TAPL Posted October 22, 2011 Posted October 22, 2011 HI TAPLhow are you I'm from France i want you help me in some code this topics viewtopic.php?f=91&t=36599 you are the best Sorry for your trouble thank you i remember MOJRM-511 was always say "you are the best" you have 3 account 1-MOJRM-511 2-adward 3-LI7IL lol hi i wanna settimer on 5 Minutehow i but 5 Minute i know the second = 1000 but i wanna put 5 Minute how
Castillo Posted October 22, 2011 Posted October 22, 2011 @adward: Remember to add this resource to the acl.xml in the group "Admin", executeCommandHandler requires admin permissions.
adward Posted October 22, 2011 Author Posted October 22, 2011 Solidsnake14 thank you i remember MOJRM-511 was always say "you are the best" you have 3 account 1-MOJRM-511 2-adward 3-LI7IL I do not know MOJRM-511 and LI7IL ?????????????????????????????????????????? thanks all
adward Posted October 22, 2011 Author Posted October 22, 2011 I take this script voice by MOJRM-511 from my friend please stop comment in my topic thank
adward Posted October 24, 2011 Author Posted October 24, 2011 hi please help me i know to make client side and server side but when iam make more button client side not work plz tell me where wrong? this client side: addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"1") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"2") elseif (source == GUIEditor_Button[3]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"3") elseif (source == GUIEditor_Button[4) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"4") elseif (source == GUIEditor_Button[5]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"5") elseif (source == GUIEditor_Button[6) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"6") elseif (source == GUIEditor_Button[7]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"7") end end) thank
karlis Posted October 24, 2011 Posted October 24, 2011 what's the point of 2 local p arguments? and you are mojrm for sure, 1:1 grammar.
Castillo Posted October 24, 2011 Posted October 24, 2011 karlis, that's what I gave him in the first time, this way it send's a player element to the server side (apart from 'source').
AnDReJ98 Posted October 24, 2011 Posted October 24, 2011 maybe like this addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"1") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"2") end end) addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[3]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"3") elseif (source == GUIEditor_Button[4]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"4") end end) addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[5]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"5") elseif (source == GUIEditor_Button[6]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"6") end end) i cant sure
Castillo Posted October 24, 2011 Posted October 24, 2011 not work What exactly doesn't work? you'll never get it fixed if you don't give more details. @karlis: Wouldn't be the same?
karlis Posted October 24, 2011 Posted October 24, 2011 actually, it wouldn't, it takes for about 20% more bandwidth then it would by just using source.
adward Posted October 24, 2011 Author Posted October 24, 2011 when i ma more boton like this addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"1") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"2") elseif (source == GUIEditor_Button[3]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"3") elseif (source == GUIEditor_Button[4) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"4") elseif (source == GUIEditor_Button[5]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"5") elseif (source == GUIEditor_Button[6) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"6") elseif (source == GUIEditor_Button[7]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"7") elseif (source == GUIEditor_Button[8]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"8 end end) client side not work plz he me
karlis Posted October 24, 2011 Posted October 24, 2011 do you know such thing as /debugscript? line 18 " and ) missing.
Castillo Posted October 24, 2011 Posted October 24, 2011 addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"1") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"2") elseif (source == GUIEditor_Button[3]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"3") elseif (source == GUIEditor_Button[4) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"4") elseif (source == GUIEditor_Button[5]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"5") elseif (source == GUIEditor_Button[6) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"6") elseif (source == GUIEditor_Button[7]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"7") elseif (source == GUIEditor_Button[8]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"8") -- You had a missing " and a missing ). end end)
adward Posted October 24, 2011 Author Posted October 24, 2011 not work client side addEventHandler("onClientGUIClick",root, function () if (source == GUIEditor_Button[1]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"1") elseif (source == GUIEditor_Button[2]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"2") elseif (source == GUIEditor_Button[3]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"3") elseif (source == GUIEditor_Button[4) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"4") elseif (source == GUIEditor_Button[5]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"5") elseif (source == GUIEditor_Button[6) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"6") elseif (source == GUIEditor_Button[7]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"7") elseif (source == GUIEditor_Button[8]) then triggerServerEvent("executeACommand",localPlayer,localPlayer,"8") -- You had a missing " and a missing ). end end) serve side addEvent("executeACommand",true) addEventHandler("executeACommand",root, function (client, action) executeCommandHandler("vote", client, "arena ".. tostring(action)) end)
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