vandie Posted December 19, 2012 Author Share Posted December 19, 2012 I made this tutorial as I have not given anything to the community and I wanted to so here it is!This Tutorial is for newbs because most 'experienced' users will know how to do this.Im going to show you how to make it so that player vs admin is toggle-able.server sidecreate a check box on frmServer called **chkAdminAttack** and set the caption to **Alow Admin vs Player?**now find this in modCombat```Check to make sure that they dont have accessIf GetPlayerAccess(attacker) > ADMIN_MONITOR Then Call PlayerMsg(attacker, "Admins cannot attack other players.", BrightBlue) Exit FunctionEnd If' Check to make sure the victim isn't an adminIf GetPlayerAccess(victim) > ADMIN_MONITOR Then Call PlayerMsg(attacker, "You cannot attack " & GetPlayerName(victim) & "!", BrightRed) Exit FunctionEnd If```and replace it with this```If frmServer.chkAdminAttack.Value = 0 Then' Check to make sure that they dont have accessIf GetPlayerAccess(attacker) > ADMIN_MONITOR Then Call PlayerMsg(attacker, "Admins cannot attack other players.", BrightBlue) Exit FunctionEnd If' Check to make sure the victim isn't an adminIf GetPlayerAccess(victim) > ADMIN_MONITOR Then Call PlayerMsg(attacker, "You cannot attack " & GetPlayerName(victim) & "!", BrightRed) Exit FunctionEnd IfEnd If```now compile run and your done.if the box is ticked then admins can attack players and vice versa were as if it is not then they cannot ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)by vandieps.I know Im a crap programmer so i don't need to be told Link to comment Share on other sites More sharing options...
Matt Posted December 19, 2012 Share Posted December 19, 2012 Ideally each admin should have a command to toggle personally whether or not he or she can be attack or attack players, and not have it server wide. Regardless, its a good tutorial and simple tutorial. Good work! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
vandie Posted December 19, 2012 Author Share Posted December 19, 2012 ThanksI'm just learning vb6 and thought that this could be useful for events and stuff 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