ULX Commands Class Oriented *Coder Appriciated* DarkRP

i want to make a class on darkrp that only allows admin to become it and use certain commands like if i became it i would be able to use noclip, slap, slay, kick, ban things like that. Can anyone help? and i also want Shipments to add together

Use this fucking button.

http://choopd.com/?h=26572119e616c3a0ce9e7d78f27b2bce

if ply:IsAdmin() then
Class code here
end

Or you can also do it within the class but the above method is easier for noobs like you to understand.

Yea well guess what dick it doesn’t work because iv tried that

You can also make it admin only by using the in class function.
You can also make it admin by checking if ply:IsAdmin() via the end of it.

AddExtraTeam( “<NAME OF THE CLASS>”, Color(<red>, <Green>, <blue>, 255), “<Player model>” , [[<the description(it can have enters)>]], { “<first extra weapon>”,"<second extra weapon>", etc…}, “<chat command to become it(WITHOUT THE /!)>”, <maximum amount of this team> <the salary he gets>, 0/1/2 = public /admin only / superadmin only, <1/0/true/false Do you have to vote to become it>, true/false DOES THIS TEAM HAVE A GUN LICENSE?, TEAM: Which team you need to be to become this team)

I wouldn’t disrespect me if you’re too stupid to read DarkRP description or even implent a simple if code.

God, I can already tell you’re twelve years old.

actually I’m fifteen but thanks anyway I’ll take advice

[editline]8th December 2011[/editline]

But my actual question was that I wanted to make certain commands to only work for the admin class like u have to be the class to use em and if your not you cant

You have to make your own admin mod.

Just add an if statement to check ply:Team() for each command. It should be simple enough for you to figure out.

Now ima sound noobosh but w.e should I put it in the end of the code of my classes? Or on a code in ulx?

You would have to add it to all the ulx functions for the commands you want to only work for that class. It might already have an if statement checking if the player is an admin (haven’t looked at ULX’s code), which could be edited to also check for the right class.

Well you CAN edit it but it would take longer than to just make a simple admin mod, that’s why I suggested making a new one with little functions but Neo is correct.

Thanks very helpful :slight_smile: iv been trying to code it for my server never could but anther thing I wanted to make shipments add together like if I put one shipment on another it’ll add 10 to one box

You’d have to write a hook for collisions on shipments that checks if they collide with another of the same gun and removes both of them, making a new bigger one.

Thank you very much :slight_smile:

ply:GetNWString(“usergroup”) == “your rank name” - FAdmin

ply:GetUserGroup(“your rank name”) - ULX

ply:GetNWString(“EV_Your rank name”) - Evolve.

function(ply) return ply:GetNWString(“usergroup”) == “donator” or ply:IsAdmin() end (Example)

Hope it helped.

thanks this works too :slight_smile: