General > Developers Corner

Lua errors after using function(ply) return ply:IsUserGroup("donator") end)

<< < (2/5) > >>

daniel507:
New problem lol, everything was working fine but it has suddenly just gave the jobs to everyone. the script is there but it is not abiding by it. There are no script errors so i don't know what the problem is?!

daniel507:
bump

MrPresident:
Reading into the commented section of that file you provided: I hate to be the one to break this to you, but the AddExtraTeam function is not designed to do what you are trying to do.

You would need to modify the AddExtraTeam function to include a boolean argument for what groups can see this team.


ALTERNATELY you can try this..  I have NO idea if it will work or not, as I do not endorse DarkRP and will never run it to test scripts. You can feel free to try this though and see if it works.

I have modified your shared file and it is attached to this post.

Feel free to post any errors you receive and I will help you to the best of my ability.

daniel507:
[ERROR] gamemodes/darkrp/gamemode/shared.lua:117: attempt to call method 'IsUserGroup' (a nil value)
  1. unknown - gamemodes/darkrp/gamemode/shared.lua:117
   2. include - [C]:-1
    3. unknown - gamemodes/darkrp/gamemode/cl_init.lua:86

the donator jobs are not available for normal users which is good but they are now not even available to donators :/

MrPresident:
If you change the file I posted then post the new file. Line 117 in the file I edited for you doesn't even have IsUserGroup in it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version