function ulx.ttt_setkarma ( calling_ply, target_ply, amount )
target_ply:SetLiveKarma( amount )
target_ply:SetBaseKarma( amount )
ulx.fancyLogAdmin( calling_ply, "#A set TTT Karma for #T to #i", target_ply, amount )
end
local ttt_setkarma = ulx.command ( "TTT", "ulx ttt_setkarma", ulx.ttt_setkarma, "!ttt_setkarma" )
ttt_setkarma:addParam { type=ULib.cmds.PlayerArg } -- no S in PlayerSArg, limited to one target at a time
ttt_setkarma:addParam{ type=ULib.cmds.NumArg, min=0, max=5000, default=50, hint="karma", ULib.cmds.optional, ULib.cmds.round }
ttt_setkarma:defaultAccess( ULib.ACCESS_ADMIN )
ttt_setkarma:help ( "Sets TTT Karma for <target> to <amount>" )
ttt_setkarma:logString ( "#1s set TTT Karma on #2s to #3i" )
First, this is untested. It should 'just work' in ULX.
Most of it is, at least I think is, self explanatory. Change the numbers you want. Amount is optional (it will default to 50).
I've no idea what will be added to XGUI (ie, sliders/dropdowns, etc.) You'll need to research a bit on your own, as I don't have time to look at the XGUI structure right now.
The code was straight out of my head (I love ULib/ULX for this..every command is easy to set up. The command setup does all the input checking for you (ie, make sure player is entered, make sure default amount, if no amount, use a set default)