How to make a Admin JOB in DarkRP ???

Post closed

Go to wherever you choose a class and do:

[lua]for _, v in pairs(player.GetAll()) do
if v:IsAdmin() then
<code to show/allow the admin + regular classes here>
else
<code to show the regular classes>
end
end[/lua]It’s a bit difficult to help you without a code. Can you post here the code where the players choose the class?

what? no.

[lua]
team.SetUp(1337, “Admins”, Color(0,0,255,255))

function GM:PlayerInitialSpawn( ply )
if ply:SteamID() == (“admin’s steam ID”) then
ply:SetTeam(1337)
end
end

function GM:PlayerLoadout(ply)

ply:StripWeapons()

if ply:Team() == 1337 then do
--Give weapons, etc
end

end
end
[/lua]

http://darkrp.megagamer.net/kit/index.php?i=classmaker

Permissions, who can become this class?
Super Admin
Admin
Everyone

Easy as that.

What? No.

[lua]
TEAM_ADMIN = 1337
team.SetUp(TEAM_ADMIN, “Admin”, Color(0,0,255,255))

function Example1(pl)
if pl:IsAdmin() then
pl:SetTeam(TEAM_ADMIN)
end
end
hook.Add(“PlayerInitialSpawn”, “example1”, Example1)

function Example2(pl)
if pl:Team() == TEAM_ADMIN then
pl:Give(“weapon_deagle”) //Change to whatever you want.
end
end
hook.Add(“PlayerLoudout”, “example2”, Example2)
[/lua]

God, have you guys ever heard that DarkRP has a easy job making system?

Listen to Zeroi

thx for the help :)…
and the link for Class Maker :wink:

POST CLOSED