Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Toggle-able player vs admin


vandie
 Share

Recommended Posts

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 side

create 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 access

If GetPlayerAccess(attacker) > ADMIN_MONITOR Then

Call PlayerMsg(attacker, "Admins cannot attack other players.", BrightBlue)

Exit Function

End If

' Check to make sure the victim isn't an admin

If GetPlayerAccess(victim) > ADMIN_MONITOR Then

Call PlayerMsg(attacker, "You cannot attack " & GetPlayerName(victim) & "!", BrightRed)

Exit Function

End If

```

and replace it with this

```

If frmServer.chkAdminAttack.Value = 0 Then

' Check to make sure that they dont have access

If GetPlayerAccess(attacker) > ADMIN_MONITOR Then

Call PlayerMsg(attacker, "Admins cannot attack other players.", BrightBlue)

Exit Function

End If

' Check to make sure the victim isn't an admin

If GetPlayerAccess(victim) > ADMIN_MONITOR Then

Call PlayerMsg(attacker, "You cannot attack " & GetPlayerName(victim) & "!", BrightRed)

Exit Function

End If

End 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 vandie

ps.I know Im a crap programmer so i don't need to be told
Link to comment
Share on other sites

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

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
 Share

×
×
  • Create New...