dima3367 Posted February 20, 2020 Posted February 20, 2020 Hello everybody! Please tell me how to make the team work through the server console? I need to make the /givemoney team work through the server console . I made an export to meta to the function where the command is written, but this did not help. I would be grateful for your help.
Moderators IIYAMA Posted February 20, 2020 Moderators Posted February 20, 2020 1 hour ago, dima3367 said: function where the command is written You can use the addCommandHandler. addCommandHandler ( "givemoney", function (responsibleElement, commandName, teamName, money) iprint("givemoney command used") if responsibleElement and getElementType(responsibleElement) == "console" then iprint("the one used the command is the console") money = tonumber(money) if teamName and money then iprint("parameters are valid!") -- do your stuff end end end) 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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