General > Developers Corner

Running ULX console commands properly.

(1/2) > >>

Jonas Præstegaard:
Hey everyone.

I'm trying to make my admins run certain commands using a menu. As party of the menu, I have something like this:


--- Code: ---RunConsoleCommand("ulx","slay",tar:Name())
--- End code ---

That works, but the problem is, sometimes it doesn't. Sometimes it will target multiple people with similar names, other times it wont be able to find any target(s).

ULX doesn't seem to support targeting via SteamID, so is there any other way to target a specific player, using Lua-run console commands?

Any help is appreciated :D

iViscosity:
I'm guessing here, as I don't really know for sure, but try using tar:Nick() instead. Just a thought and it usually works better than Name(). I could be wrong though, worth a shot

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version