bravo351 Posted September 13, 2009 Posted September 13, 2009 In integrating "legalsystem" into the server I'm helping to build (ty Slothman, author), I need a way to restrict the availability of cop skins to certain members of the server. In the mainly freeroam server I'm administering, there are 2 ways to obtain setElementModel; /setskin (or the F1 button of the "freeroam" GUI), or /skin, made possible by the following script: function playerSkin ( player, commandName, id ) setElementModel ( player, id ) end addCommandHandler ("skin", playerSkin ) "legalsystem" works by identifying Officers by skin, not by team. I tried recoding it to identify by server team with getPlayerTeam and failed, so I'm left with restricting the cop skins to the Police team in these 2 skin-getting resources. How do I do this? Any help offered would be greatly appreciated, and due credit will be inserted into each altered resource. Thank you. "Don't try and be a great man, just be a man; and let history make the call."
50p Posted September 13, 2009 Posted September 13, 2009 It seems that working with teams for some people is confusing. I have no idea why though. Tell us, what you've had problems with? Any error/warning messages? BTW, use debug window for debugging. It will show you every error and warning messages. /debugscript 3 - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
bravo351 Posted September 13, 2009 Author Posted September 13, 2009 I didn't have any error messages whatsoever... my team problem came in properly referencing it in other scripts. Slothman was kind enough to help me with tightening up the bad syntax i used, in particular getTeamFromName instead of getTeamName. So now instead of restricting the skin models I don't want certain people in the server to have, I simply reference the server team and let the others wear whatever they want. I'd still like to know how I could restrict the available skins to spawn with for certain groups, but it's not nearly as critical anymore. "Don't try and be a great man, just be a man; and let history make the call."
Slothman Posted September 15, 2009 Posted September 15, 2009 ...and that seems like the perfict time to bring up the fact that i updated legalsystem (partly due to bravo's need for a better team system) https://community.multitheftauto.com/index.php?p=resources&s=details&id=292 I'ts sorrt of self-explanitory, but I'll go into the details in the scripts forum topic HERE Check out my recent work: ZDay - a zombie script Slothbot - an AI deathmatch bot my community profile (all my resources)
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