General > Developers Corner

some of our jobs dissappeared from F4

(1/4) > >>

petturoidakko:
So suddendly some of our custom jobs stopped showing on F4menu, but you can still use command example /swat  in chat to become one of those jobs.


--- Quote ---})

TEAM_SWAT = DarkRP.createJob("SWAT", {
   color = Color(25, 25, 170, 255),
   model = "models/gign remasteredhd.mdl",
   description = [[More experienced than the average CP.
You guys are called in to prevent raids.]],
   weapons = {"m9k_m16a4_acog", "weapon_shield", "m9k_m61_frag", "m9k_knife", "arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker","weapon_taser"},
   command = "swat",
   max = 5,
   salary = 85,
   admin = 0,
   vote = false,
   hasLicense = true,
   hasRadio = true,
   canTalkToGlobal = true,
   
   candemote = false,
        customCheck = function(ply) return ply:IsUserGroup("donator") or ply:IsUserGroup("donor mod") or ply:IsUserGroup("donor admin") or ply:IsUserGroup("superadmin") end,
        CustomCheckFailMsg = "You need to be a donator to become a SWAT."
})
--- End quote ---

that is the code we use for ex: swat.
cant find anything wrong with it.

Our ulx groups are like that

donator
donor mod
superadmin
admin
no uppercase letters

Caustic Soda-Senpai:
First, for simplicity, you can use ply:IsSuperAdmin instead of ply:IsUserGroup("superadmin") just for the laziness all coders have and are there any errors printed to console when you load the server? Are you using stock F4? Are any other jobs with these same ranks having these problems or is it just SWAT?

petturoidakko:

--- Quote from: syst3M4TiK on March 27, 2015, 05:04:08 PM ---First, for simplicity, you can use ply:IsSuperAdmin instead of ply:IsUserGroup("superadmin") just for the laziness all coders have and are there any errors printed to console when you load the server? Are you using stock F4? Are any other jobs with these same ranks having these problems or is it just SWAT?

--- End quote ---

Well not with these groups, but example superadmin job is working completly fine.

but you cant use   ply:IsSuperAdmin  like ply:IsDonator  right?

Caustic Soda-Senpai:
My money is on the spaces in your ULX Groups. From my knowledge, ULX doesn't like spaces.

Also, you can use ply:IsAdmin (which allows anyone who inherits admin to use it.) or ply:IsSuperAdmin (which allows anyone who inherits superadmin to use it.)

petturoidakko:

--- Quote from: syst3M4TiK on March 28, 2015, 04:18:33 AM ---My money is on the spaces in your ULX Groups. From my knowledge, ULX doesn't like spaces.

Also, you can use ply:IsAdmin (which allows anyone who inherits admin to use it.) or ply:IsSuperAdmin (which allows anyone who inherits superadmin to use it.)

--- End quote ---

But I dont understand why it does not work as it worked fine, but suddendly stopped working.

Navigation

[0] Message Index

[#] Next page

Go to full version