General > Developers Corner
ULX RunConsoleCommand Issues
JamminR:
I'm 90% sure you can't run our commands from console and feed them userid as input.
Which is why I've asked if you've tried any of those commands from server console to make sure of the 10% uncertainty.
--- Code: ---local randomPly = tab[math.random(1,#tab)]
--- End code ---
I think that would get you 1 to the # of players, including allowing it to pick the last/highest number.
As for what they told you on facepunch, that all depends on what scripts your using.
ULX console commands prefer names.
randomPly:Nick() would likely work better for you, at least, get you farther.
After you get this far though, you really shouldn't use console commands.
As long as your script runs after ULX is loaded, you could use raw functions and just the randomPly player object.
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version