Jump to content

i need help please


likemike12

Recommended Posts

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
---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 by Guest
Link to comment
---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
---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

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...