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

Everyone can get admin [Resolved]


Zzbrandon
 Share

Recommended Posts

Ok so I changed this to

If GetPlayerAccess(Index) < ADMIN_CREATOR Then

to

If GetPlayerAccess(Index) = ADMIN_CREATOR Then

Because there is a higher Access that is for members and I dont want them getting hold of admin and stuff but it doesnt seem to work I can still open with any Access?

How can I change the code to only make ADMIN_CREATOR be able to use the command?
Link to comment
Share on other sites

Okay both of you are misunderstanding the code.

```

If GetPlayerAccess(MyIndex) = ADMIN_CREATOR Then GoTo Continue

```

What this is saying is that if their access level is ADMIN_CREATOR then go to the Continue. The Continue in this case is an exit out line of code that prevents members who are NOT Admins from entering Admin commands.
Link to comment
Share on other sites

lol soz sekaru i was just going off the top of my head, i hadnt actually looked to see what he was talking about. I should prolly pay more attention.

and why the hell did you make members access 5? it just seems like a bad way of putting it.
Link to comment
Share on other sites

> Yea but that is making it if Access is 4 or Greater than they can Access but I dont want that because Member's Access is 5.

Admin = 5, Member = 0 (or 1, can't remember which).

> lol soz sekaru i was just going off the top of my head, i hadnt actually looked to see what he was talking about. I should prolly pay more attention.
>
> and why the hell did you make members access 5? it just seems like a bad way of putting it.

No worries man, I just remembered that because I made the same mistake when Robin changed the way commands were handled.
Link to comment
Share on other sites

> ```
>
> If GetPlayerAccess(MyIndex) <> ADMIN_CREATOR Then GoTo Continue
>
> ```
> <> = not equal.

I was explaining his code to him.

But yeah, like mrsean said just use "If GetPlayerAccess(MyIndex) <> ADMIN_CREATOR Then GoTo Continue".
Link to comment
Share on other sites

for added fun:

```

' Admin constants

Public Const ADMIN_MONITOR As Byte = 1

Public Const ADMIN_MAPPER As Byte = 2

Public Const ADMIN_DEVELOPER As Byte = 4

Public Const ADMIN_CREATOR As Byte = 8

' Player constants

Public Const Player_Member As Byte = 16

If NOT(GetPlayerAccess(MyIndex) AND (ADMIN_CREATOR Or ADMIN_DEVELOPER)) Then GoTo Continue

```

That will (hopefully) allow ADMIN_CREATOR or ADMIN_DEVELOPER to access it. You'll have to change all the checks though.

Or suffix new ones with _NEW e.g. ADMIN_CREATOR_NEW

Something like that, My VB6 foo is rusty.

[Reference](http://www.vb6.us/tutorials/how-utilize-binary-flags-your-program).
Link to comment
Share on other sites

> Thanks guys lol already 2 pages I think I do ask to much I been here for 2 months and too many posts ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)
>
> So <> is just like equal sign in vb6?

No, It's not equal to. If the player's access is not equal to admin_creator, go to the continue label.
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...