Making a DarkRP class for a certain SteamID

I wanted to make a class/team in DarkRP that only mentioned SteamID’s could use. So far… I could not get it to work.

The code looks a little like this:

if ply:SteamID() == --[[The_Bertolet–]]“STEAM_0:0:12642114” or if ply:SteamID == --[[My_Friend–]]“STEAM_ID_HERE” then
TEAM_SOMETHING = AddExtraTeam(“SOMETHING”, Color(255, 255, 0, 255), {
[[The description of the class goes in here.
blablablablablablablablabla.]], {}, “something”, 10, 50, 0, false, true)

(The real SteamID is mine)

The result: nothing.

I get no errors in the client or server console, and the whole job is completely ignored.
I’m DEFINITELY doing something wrong, so could anyone tell me where to place the code/what to modify about it?

if ply:SteamID() == --[[The_Bertolet–]]“STEAM_0:0:12642114” or if ply:SteamID == --[[My_Friend–]]“STEAM_ID_HERE” then


[lua]if( ply:SteamID() == --[[The_Bertolet–]]“STEAM_0:0:12642114” or ply:SteamID == --[[My_Friend–]]“STEAM_ID_HERE” )then [/lua]

And make sure ply is defined.

for k, v in pairs(player.GetAll()) do
if(v:SteamID == “SteamIDHere” || v:SteamID() == “SecondSteamID”) then //you can add as many checks as you need, just keep adding || v:SteamID() == “steamid”
//handle job making

[editline]25th May 2011[/editline]

line 1: Loop through the table of player
line 2: check if the found value’s( in the player table ) matches a SteamID
line 3: Add your job making code
line 4: end the if statement
line 5: end the for loop

I have never looked at DarkRP job making( when I came onto the scene DarkRP was the most trolled gamemode, and still is ) but I assume that just adding the generic code should work on line 4, if not there may be certain functions to add for certain SteamID’s.

Go to sh_commands.lua

Line 494
[lua] local a = CTeam.admin
if a > 0 and not ply:IsAdmin()
or a > 1 and not ply:IsSuperAdmin()
Notify(ply, 1, 4, string.format(LANGUAGE.need_admin,
return “”

and change it to something like:

[lua] local a = CTeam.admin
if a > 0 and not ply:IsAdmin()
or a > 1 and not ply:IsSuperAdmin()
or a > 3 and not ply:SteamID() == “STEAM_0:1:45454545”
Notify(ply, 1, 4, string.format(LANGUAGE.need_admin,
return “”

Theres better ways to do it but i dont have time.

Didn’t work, none of any of the jobs showed up… However, I thank you for the reply.


No problem.
A working solution, still rated dumb by King Flawless when he does not even post anything to make him more useful than me.

I don’t need to post anything

Honestly, please stop with this useless posting. More than 75% of your posts are useless.

And thank you, Science. I was looking for something like that. It helped a lot.

And 100% of your posts are simple lua questions

So what if they are?
They are still useful posts in some respects.

75% of yours are flaming, derailing and plane old being a twat to everything that moves.

I’m not going to start a flame war, so I will end it with this.

I may not be the best at Lua, so nothing is wrong with me asking a question. As for you, quit trying to act all “Lua King” and grow up.

Also, I am going to stop posting in this thread with relation to King’s stupidity.

Aww looks like I hurt your feelings again

Do you need a hug?

[editline]25th May 2011[/editline]

Your just like science you want everything handed to you on a plate and don’t want to actually search and work it out for your self. I am no Lua-King but I learned everything I know without making 100s of dumb threads because I actually did things my self.

Sorry, but who doesnt search?

Science. 100% of your posts are either stupid, useless and/or repeats of what previous people just said.
For example. Mine would’ve worked perfectly fine. Yet so simple.

No yours would not have worked cause it was not defined.

Clearly 100% of my posts are not false or stupid seen as the one that helped this thread was useful.

Your as much of a noob at lua as me so give up.

Since what wasn’t defined? I just pointed out his error. or if…
Please… Read what i write first.

Don’t try and act smart when you fail.

Single Line Comment[lua]–Comment[/lua]

Multiline comment[lua]–[[Comment

At least learn basic lua please.

[editline]25th May 2011[/editline]

Multilines can also be
but this is used far less.

23:21:38 > print("Hello, I am Science and I know " .. --[[Everything]] "nothing" --[[And I'm wrong all the time]])...
         Hello, I am Science and I know nothing

[editline]25th May 2011[/editline]

Don’t try and act smart when you fail.

Why do you make it so easy?

I know I said I wouldn’t post again, but is it possible for a moderator/admin to lock this thread? I don’t want to see this turn into an even bigger flame war. Not trying to be a backseat admin here…

Flapadar and King, not everyone is amazing at Lua, so don’t criticize them. Both of you please stop being assholes.