tiesjan Posted September 3, 2011 Share Posted September 3, 2011 hello, i'm missing a code or something in my script and i don't know what i need to enter there.... here it is function showhelp(thePlayer) showhelp=(????????)(thePlayer); outputChatBox("/pm, send a personal message",thePlayer,255,0,0); outputChatBox("/stations,set radio steams",thePlayer,255,0,0); outputChatBox("/rules,a explanation of the rules and the punishments",thePlayer,255,0,0); outputChatBox("/report report someone who breaks the rules ",thePlayer,255,0,0); outputChatBox("/lock, lock your vehicle for others",thePlayer,255,0,0); end addCommandHandler("showhelp",help); its on the place with all the ?????? Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 What is this? function showhelp(thePlayer) outputChatBox("/pm, send a personal message",thePlayer,255,0,0) outputChatBox("/stations,set radio steams",thePlayer,255,0,0) outputChatBox("/rules,a explanation of the rules and the punishments",thePlayer,255,0,0) outputChatBox("/report report someone who breaks the rules ",thePlayer,255,0,0) outputChatBox("/lock, lock your vehicle for others",thePlayer,255,0,0) end addCommandHandler("showhelp",showhelp) No need for semi colons btw. Link to comment
tiesjan Posted September 3, 2011 Author Share Posted September 3, 2011 this is a help script. if i start it and i type /help it has to show that outputchatbox lines. and the problem is.... it doesn't. i play with a couple of people on my server who doesn't much about mta and his commands Link to comment
Castillo Posted September 3, 2011 Share Posted September 3, 2011 The command is /showhelp, you should change it to "help" if you want it like that. Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 addCommandHandler ( string commandName, function handlerFunction, [bool restricted = false, bool caseSensitive = true] ) The first argument (the string) is the command. second one is the function. function showhelp(thePlayer) outputChatBox("/pm, send a personal message",thePlayer,255,0,0) outputChatBox("/stations,set radio steams",thePlayer,255,0,0) outputChatBox("/rules,a explanation of the rules and the punishments",thePlayer,255,0,0) outputChatBox("/report report someone who breaks the rules ",thePlayer,255,0,0) outputChatBox("/lock, lock your vehicle for others",thePlayer,255,0,0) end addCommandHandler("help",showhelp) The command is /help now. Link to comment
tiesjan Posted September 3, 2011 Author Share Posted September 3, 2011 (edited) thanks for the help Edited September 3, 2011 by Guest Link to comment
tiesjan Posted September 3, 2011 Author Share Posted September 3, 2011 i'm sorry but it don't work if i start the script and i type /help ingame nothing happens Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 There is a built in command "help". 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