Hello. I would like to make something that fetches console commands from a MySQL database and then runs them on the server using RunConsoleCommand(). I’m able to get the commands from the db and into lua variables without a problem. The issue is that the number of arguments in each command varies. Here’s what my code looks like.
commandArgs = string.Explode(" ", data[key]['Command']); RunConsoleCommand(commandArgs, now I'm lost)
So, I basically need to know how I would insert the second parameter into RunConsoleCommand. All the arguments are stored in the commandArgs table, but RunConsoleCommand does not accept a table as it’s second parameter. Does anyone have any tips on how to go about doing this when each command may have a different number of arguments?