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

[EO] Adding In-Game Access


hisherwin
 Share

Recommended Posts

At first i ask them how to add this one
But i figure it out myself
if this tutorial is useless
Then don't comment -.-

So lets start now

Client Side ~ Server Side
If you want the new Access can't open admin Panel then let me teach you how

on modConstants
find
```
' Admin constants
Public Const ADMIN_MONITOR As Byte = 1
Public Const ADMIN_MAPPER As Byte = 2
Public Const ADMIN_DEVELOPER As Byte = 3
Public Const ADMIN_CREATOR As Byte = 4
```
Replace it with this one
```
' Admin constants
Public Const ADMIN_ACCESSNAME As Byte =1
Public Const ADMIN_MONITOR As Byte = 2
Public Const ADMIN_MAPPER As Byte = 3
Public Const ADMIN_DEVELOPER As Byte = 4
Public Const ADMIN_CREATOR As Byte = 5
```You can change the Access Name into something you like

Client Side
modHandleData
On Private Sub HandleSayMsg find:
```
      Select Case Access
            Case 0
                colour = RGB(255, 96, 0)
            Case 1
                colour = QBColor(DarkGrey)
            Case 2
                colour = QBColor(Cyan)
            Case 3
                colour = QBColor(BrightGreen)
            Case 4
                colour = QBColor(Yellow)
```
Replace it with this one
```
      Select Case Access
            Case 0
                colour = RGB(255, 96, 0)
            Case 1
                colour = QBColor([b]COLOR[/b])
            Case 2
                colour = QBColor(DarkGrey)
            Case 3
                colour = QBColor(Cyan)
            Case 4
                colour = QBColor(BrightGreen)
            Case 5
                colour = QBColor(Yellow)
```
Change the **COLOR** into something you like

modText
on Public Sub DrawPlayerName find:
```
            Case 0
                color = RGB(255, 96, 0)
            Case 1
                color = QBColor(DarkGrey)
            Case 2
                color = QBColor(Cyan)
            Case 3
                color = QBColor(BrightGreen)
            Case 4
                color = QBColor(Yellow)
```
Replace it with this one
```
            Case 0
                color = RGB(255, 96, 0)
            Case 1
                color = QBColor([b]COLOR[/b])
            Case 2
                color = QBColor(DarkGrey)
            Case 3
                color = QBColor(Cyan)
            Case 4
                color = QBColor(BrightGreen)
            Case 5
                color = QBColor(Yellow)
```
Change the **COLOR** into something you like.

frmMain code
on Private Sub Form_KeyUp find:
```
            If Player(MyIndex).Access > 0 Then
                picAdmin.Visible = Not picAdmin.Visible
```
Replace it with this one

```
            If Player(MyIndex).Access > 1 Then
                picAdmin.Visible = Not picAdmin.Visible
```This code change the Admin Panel Access so the new Access can't open the Admin Panel , If you want the new Access to open the admin panel , Then don't follow this frmMain Code

Now head for the server
Server Side~
Go to frmServer Code

Find
```
    If Not Name = "Not Playing" Then
        Call SetPlayerAccess(FindPlayer(Name), 4)
        Call SendPlayerData(FindPlayer(Name))
        Call PlayerMsg(FindPlayer(Name), "You have been granted administrator access.", BrightCyan)
```
Replace it with this one
```
    If Not Name = "Not Playing" Then
        Call SetPlayerAccess(FindPlayer(Name), 5)
        Call SendPlayerData(FindPlayer(Name))
        Call PlayerMsg(FindPlayer(Name), "You have been granted administrator access.", BrightCyan)

```this code allow you to set your access into Admin using Server  , I know you can be a Admin using Server Side , But the access is changed into 5 , The Server access u into 4 , So you can't..

I Hope this help :)
Link to comment
Share on other sites

You can change ..

```
            If Player(MyIndex).Access > 1 Then
                picAdmin.Visible = Not picAdmin.Visible

```
To ..

```
            If Player(MyIndex).Access > ACCESSNAME Then
                picAdmin.Visible = Not picAdmin.Visible

```
Link to comment
Share on other sites

  • 3 months later...

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