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

[EO2.0 & EO3.0]Admin Speed with Shift


Wortel Angels
 Share

Recommended Posts

Hello
All Credits are going to WhyHelloThere for his tutorial
http://www.touchofdeathforums.com/smf/index.php/topic,72825.msg784983.html#msg784983

I like this tut but… when an Player ask you where it can buy anything or else and you want show them where it is you are too fast >.< and run away xD

So i modified it a little bit that when you walk, you got the normal walk speed and when you press Shift you run in Admin speed...
**~~Client Side~~**

In modConstants

Find
```
' Speed moving vars
Public Const WALK_SPEED As Byte = 4
Public Const RUN_SPEED As Byte = 6
```
Add underneath it: (the 18 can be changed to anything)
```
Public Const ADMIN_SPEED As Byte = 18
```
In modGameLogic
Find
```
' Check if player is walking, and if so process moving them over
    Select Case Player(Index).Moving
        Case MOVING_WALKING: MovementSpeed = ((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X))
        Case MOVING_RUNNING: MovementSpeed = ((ElapsedTime / 1000) * (WALK_SPEED * SIZE_X))
        Case Else: Exit Sub
    End Select
```
Add underneath it:
```
    If GetPlayerAccess(MyIndex) >= 2 Then
    Select Case Player(index).Moving
        Case MOVING_WALKING: MovementSpeed = ((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X))
        Case MOVING_RUNNING: MovementSpeed = ((ElapsedTime / 1000) * (ADMIN_SPEED * SIZE_X))
        Case Else: Exit Sub
    End Select
    End If
```
**Finish :D**
I hope it helps anyone… and sorry for my bad englisch :D
Again ALL Credits to WhyHelloThere
Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 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...