I am looking for a guy that can make custom ULX commands for DarkRP.
What the ULX command would do is: Changing a players job to models/player/combine_super_soldier.mdl (Admin On Duty), Setting someone as God-Mode, Setting someones health and armor on 100, All that on the same time.
Command would be /admin
Well lets look at how commands are setup in ULX then, shall we?
[code]function ulx.removeuser( calling_ply, target_ply )
ULib.ucl.removeUser( target_ply:UniqueID() )
ulx.fancyLogAdmin( calling_ply, "#A removed all access rights from #T", target_ply )
end
local removeuser = ulx.command( CATEGORY_NAME, "ulx removeuser", ulx.removeuser )
removeuser:addParam{ type=ULib.cmds.PlayerArg }
removeuser:defaultAccess( ULib.ACCESS_SUPERADMIN )
removeuser:help( "Permanently removes a user's access." )
[/code]
This is the code that removes a user for a group. You can take this apart and edit it to your likings depending on what you'd like to do.
[code]function ulx.setmodel( calling_ply, target_ply )
--Code to set model here
ulx.fancyLogAdmin( calling_ply, "#A set #T s model.", target_ply )
end
local setmodel = ulx.command( CATEGORY_NAME, "ulx setmodel", ulx.setmodel )
setmodel:addParam{ type=ULib.cmds.PlayerArg }
setmodel:defaultAccess( ULib.ACCESS_SUPERADMIN )
setmodel:help( "Sets a users model" )
[/code]
Example of a "set model" code, you can figure out how to set models via [URL="https://wiki.garrysmod.com/page/PLAYER/SetModel"]PLAYER:SetModel[/URL]
Good luck!
you are seriously over complicated this
just make a job with the customcommand set to admin
then do /admin...........
Sorry, you need to Log In to post a reply to this thread.