General > Developers Corner
Command added to xgui doesn't work
iSnipeu:
--- Code: ---function ulx.tttadminreport( calling_ply )
calling_ply:ConCommand("ttt_version")
end
local tttadminreport = ulx.command( CATEGORY_NAME, "ulx tttadminreport", ulx.tttadminreport )
tttadminreport:defaultAccess( ULib.ACCESS_ADMIN )
tttadminreport:help("Displays all death information in the console.")
--- End code ---
Eccid:
--- Quote from: iSnipeu on December 18, 2012, 01:00:00 AM ---
--- Code: ---function ulx.tttadminreport( calling_ply )
calling_ply:ConCommand("ttt_version")
end
local tttadminreport = ulx.command( CATEGORY_NAME, "ulx tttadminreport", ulx.tttadminreport )
tttadminreport:defaultAccess( ULib.ACCESS_ADMIN )
tttadminreport:help("Displays all death information in the console.")
--- End code ---
--- End quote ---
I had tried that, and it didn't work for me... but now it does. Is it that I didn't put spaces around the first calling_ply? Thanks a ton for all the help though.
Megiddo:
Lua is (mostly) white space agnostic, so it wasn't the spacing that made the difference.
iSnipeu:
--- Quote from: Eccid on December 18, 2012, 05:56:27 AM ---I had tried that, and it didn't work for me... but now it does. Is it that I didn't put spaces around the first calling_ply? Thanks a ton for all the help though.
--- End quote ---
calling_ply:ConCommand( calling_ply, "ttt_version" )
^ in red is what the problem was, the spacing is just how I personally like it set out.
centran:
doesn't this just basically run the command on the client console for them?
If that is the case then that user needs to have rcon access(for ttt_print_adminreport at least)
Try using ttt_print_damagelog AFTER a round has ended. All players are allowed to run that after a round ends and before a new one gets out of preparing.
Navigation
[0] Message Index
[*] Previous page
Go to full version