How would one restrict a class to a group?
Posted: Wed Jan 30, 2013 1:44 pm
I'm having another issue (again D:) Whenever someone attempts to raid a community stockpile, the progress bar never stops making people having to rejoin in order to clear the screen. Any advice?
Screenshots:
http://steamcommunity.com/sharedfiles/f ... =123938518
http://steamcommunity.com/sharedfiles/f ... =123938544
http://steamcommunity.com/sharedfiles/f ... =123938558
Also two questions;
1.) How would one restrict a class to a group?
I used the code:
I put it in the shared.lua:
2.) Adding in weapons. I'm trying to add in the Crossbow for the donator group "Vault Dweller". My attempts at copying one of the exsisting weapons, then changing the information didn't seem to work!
Any help appreciated
Screenshots:
http://steamcommunity.com/sharedfiles/f ... =123938518
http://steamcommunity.com/sharedfiles/f ... =123938544
http://steamcommunity.com/sharedfiles/f ... =123938558
Also two questions;
1.) How would one restrict a class to a group?
I used the code:
- Code: Select all
function(ply) return ply:GetUserGroup() == "donator" end
I put it in the shared.lua:
- Code: Select all
--Team Variables
TEAM_WASTELANDER = 6
TEAM_SCAVENGER = 7
TEAM_SCIENCE = 8
TEAM_ENGINEER = 9
TEAM_CULTIVATOR = 5
TEAM_DONATOR = 4
team.SetUp( TEAM_WASTELANDER, "Wastelander", Color( 125, 125, 125, 255 ) ) --Gray
team.SetUp( TEAM_SCAVENGER, "Scavenger", Color( 102, 51, 0, 225 ) ) --Brown
team.SetUp( TEAM_SCIENCE, "Science", Color( 0, 0, 153, 225 ) ) --Blue
team.SetUp( TEAM_ENGINEER, "Engineer", Color( 255, 204, 0, 225 ) ) --Orange
team.SetUp( TEAM_CULTIVATOR, "Cultivator", Color( 51, 153, 0, 225 ) ) --Green
team.SetUp( TEAM_DONATOR, "Vault Dweller", Color(0, 100, 0) function(ply) return ply:GetUserGroup() == "donator" or ply:IsAdmin() end)
2.) Adding in weapons. I'm trying to add in the Crossbow for the donator group "Vault Dweller". My attempts at copying one of the exsisting weapons, then changing the information didn't seem to work!
Any help appreciated