Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "DarkRPFinishedLoading", "ML::ULX", function()
- local CATEGORY_NAME = "F3 Management";
- function ulx.setCredits( calling_ply, target_ply, amount )
- if( type( amount ) != "number" ) then
- calling_ply:ChatPrint( "Invalid amount! Only a number." );
- return;
- end
- ML:SetCredits( target_ply, amount );
- ulx.fancyLogAdmin( calling_ply, "#A set #Ts credits to #i", target_ply, amount );
- end
- //local setCredits = ulx.command( CATEGORY_NAME, "ulx setcredits", ulx.setCredits, "!setcredits" )
- setCredits:addParam{ type=ULib.cmds.PlayerArg };
- setCredits:addParam{ type=ULib.cmds.NumArg, hint="credits" };
- setCredits:defaultAccess( ULib.ACCESS_ADMIN );
- setCredits:help( "Sets the F3 credits of a user." );
- function ulx.addCredits( calling_ply, target_ply, amount )
- if( type( amount ) != "number" ) then
- calling_ply:ChatPrint( "Invalid amount! Only a number." );
- return;
- end
- ML:AddCredits( target_ply, amount );
- ulx.fancyLogAdmin( calling_ply, "#A gave #T #i credits", target_ply, amount );
- end
- local addCredits = ulx.command( CATEGORY_NAME, "ulx addcredits", ulx.addCredits, "!addcredits" )
- addCredits:addParam{ type=ULib.cmds.PlayerArg };
- addCredits:addParam{ type=ULib.cmds.NumArg, hint="credits" };
- addCredits:defaultAccess( ULib.ACCESS_ADMIN );
- addCredits:help( "Add to the F3 credits of a user(you can use negative amounts like -100)." );
- function ulx.getCredits( calling_ply, target_ply )
- calling_ply:ChatPrint( target_ply:Nick() .. " has " .. ( target_ply.Credits or 0 ) .. " credits." );
- end
- //local getCredits = ulx.command( CATEGORY_NAME, "ulx getcredits", ulx.getCredits, "!getcredits" )
- getCredits:addParam{ type=ULib.cmds.PlayerArg };
- getCredits:defaultAccess( ULib.ACCESS_ADMIN );
- getCredits:help( "Shows a users F3 credit amount." );
- function ulx.resetAll( calling_ply, target_ply )
- ML:Reset( target_ply );
- ulx.fancyLogAdmin( calling_ply, "#A reset #Ts F3", target_ply );
- end
- local resetAll = ulx.command( CATEGORY_NAME, "ulx resetall", ulx.resetAll, "!resetall" )
- resetAll:addParam{ type=ULib.cmds.PlayerArg };
- resetAll:defaultAccess( ULib.ACCESS_ADMIN );
- resetAll:help( "Resets a users loadout, credits and owned items." );
- end );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement