likemike12 Posted April 21, 2016 Share Posted April 21, 2016 hey there i hope this time to get some help i need a help how can i connect a command in a key in the keyboard to make a bindkey for all the players not just for me i need the code i have to use i'm a new programer not a new new just new i know about alot of things and idk alot of things and thanks Link to comment
OnlineCheater Posted April 21, 2016 Share Posted April 21, 2016 [url]https://wiki.multitheftauto.com/wiki/BindKey[/url] server side Link to comment
likemike12 Posted April 21, 2016 Author Share Posted April 21, 2016 [url]https://wiki.multitheftauto.com/wiki/BindKey[/url] server side can you give me the code Link to comment
likemike12 Posted April 21, 2016 Author Share Posted April 21, 2016 [url]https://wiki.multitheftauto.com/wiki/BindKey[/url] server side ill try and thx Link to comment
likemike12 Posted April 21, 2016 Author Share Posted April 21, 2016 function fanFunction() bindKey (source,"x","down", function(player,key,state) outputChatBox (getPlayerName (player) .. "test",getRootElement(),255,255,0,true) end ) end addEventHandler ("onPlayerLogin",getRootElement(),fanFunction) not working with me Link to comment
Ahmed Ly Posted April 21, 2016 Share Posted April 21, 2016 (edited) ---Server function fanFunction() for _,v in ipairs ( getElementsByType ( "player" ) ) do triggerClientEvent(v,"open",v) end end bindKey("x", "down", fanFunction) --Client function openn() guiSetVisible(wnd,true) showCursor(true) end addEvent("open",true) addEventHandler("open",root,openn) Edited April 21, 2016 by Guest Link to comment
likemike12 Posted April 21, 2016 Author Share Posted April 21, 2016 ---Server function fanFunction() triggerClientEvent(source,"open",source) end bindKey("x", "down", fanFunction) --Client function openn() guiSetVisible(wnd,true) showCursor(true) end addEvent("open",true) addEventHandler("open",root,openn) man not for a gui window for command it's just server not need client Link to comment
Anubhav Posted April 21, 2016 Share Posted April 21, 2016 ---Server function fanFunction() triggerClientEvent(source,"open",source) end bindKey("x", "down", fanFunction) --Client function openn() guiSetVisible(wnd,true) showCursor(true) end addEvent("open",true) addEventHandler("open",root,openn) Wouldn't even work? bindKey 1st argument requires player at server side. 2nd. He doesn't want to create GUI as far as I see. 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