Goliath Posted November 18, 2017 Report Share Posted November 18, 2017 Hey everybody, Since I became the RG Commander, I have noticed that if we want to change from our battle armour to our robes, we need to call staff and waste there time. To fix this, I have written a small, lightweight script that can be put in the servers serverside autorun that allows people to switch between their battle armor and robes using a simple chat command !switch. The addon has been made in such a way that other regiments can be added with minimal effort. Thanks for considering this @Martibo @Caboose and @Wolf. The code is as follows and should be placed in garrysmod\lua\autorun\server: local SwitchPairs = { {"models/player/starwars/mistersweetroll/imperialguard.mdl","models/player/ven/guard.mdl"}, // just add a pair of models here } local SwitchTable = {} for k,v in pairs(SwitchPairs) do table.insert(SwitchTable,0,v) table.insert(SwitchTable,0,table.Reverse(v)) end hook.Add("PlayerSay","SwitchModel",function (ply,txt) if string.lower(txt) == "!switch" then for k,v in pairs(SwitchTable) do if ply:GetModel() == v[1] then ply:SetModel(v[2]) return "" end end end end) 4 Link to comment Share on other sites More sharing options...
Emerald Posted November 18, 2017 Report Share Posted November 18, 2017 +1 Would be a good addition. Link to comment Share on other sites More sharing options...
[IG] Tackxo Posted November 18, 2017 Report Share Posted November 18, 2017 +1 Link to comment Share on other sites More sharing options...
DanK Posted November 18, 2017 Report Share Posted November 18, 2017 . Link to comment Share on other sites More sharing options...
pinejack Posted November 18, 2017 Report Share Posted November 18, 2017 5 minutes ago, DanK said: +1 Would be very helpful for the RG/SG regiments and fit for roleplay Robes should only be worn when not in battle That is exactly what they are currently, but we have to call staff over and over if we want them changed. Link to comment Share on other sites More sharing options...
Martibo Posted November 18, 2017 Report Share Posted November 18, 2017 I'll talk to caboose about it 1 Link to comment Share on other sites More sharing options...
Kendrick Posted November 18, 2017 Report Share Posted November 18, 2017 +1 Link to comment Share on other sites More sharing options...
Gaben Posted November 18, 2017 Report Share Posted November 18, 2017 Wouldn’t it be easier and more effective to join the models using body groups? Link to comment Share on other sites More sharing options...
Ramirez Posted November 18, 2017 Report Share Posted November 18, 2017 +1, Don’t really see why not Link to comment Share on other sites More sharing options...
Stryker Posted November 18, 2017 Report Share Posted November 18, 2017 instead of having that as an autorun they could just change the model you get in the job code.......... (dots continue for 3 years) Link to comment Share on other sites More sharing options...
pinejack Posted November 18, 2017 Report Share Posted November 18, 2017 14 minutes ago, |Stryker| said: instead of having that as an autorun they could just change the model you get in the job code.......... (dots continue for 3 years) Then we would have to call staff to change our robes back to the other ones...................(dots continue for 4 years) Link to comment Share on other sites More sharing options...
Stryker Posted November 18, 2017 Report Share Posted November 18, 2017 (edited) 46 minutes ago, pinejack said: Then we would have to call staff to change our robes back to the other ones...................(dots continue for 4 years) Probably would have helped if i read it... lool I was tooo busy playing bf2 Edited November 18, 2017 by |Stryker| Link to comment Share on other sites More sharing options...
Tatsumaki Posted November 18, 2017 Report Share Posted November 18, 2017 +5 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now