Jump to content

Restricting Certain Skins


bravo351

Recommended Posts

Posted

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."

Posted

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
Posted

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."

Posted

...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)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...