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

Re spawn Automatically at the place you die [UNSOLVED]


schnurman
 Share

Recommended Posts

In Server source, in modPlayer under Sub OnDeath replace

```
    ' Warp player away
    Call SetPlayerDir(Index, DIR_DOWN)

        If .BootMap > 0 Then
            PlayerWarp Index, .BootMap, .BootX, .BootY
        Else
            Call PlayerWarp(Index, START_MAP, START_X, START_Y)
        End If
    End With

```
and replace it with
```
    ' Warp player away
    Call SetPlayerDir(Index, DIR_DOWN)

    PlayerWarp Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)

```
Link to comment
Share on other sites

@foxtrott:

> In Server source, in modPlayer under Sub OnDeath replace
>
> ```
>     ' Warp player away
>     Call SetPlayerDir(Index, DIR_DOWN)
>    
>         If .BootMap > 0 Then
>             PlayerWarp Index, .BootMap, .BootX, .BootY
>         Else
>             Call PlayerWarp(Index, START_MAP, START_X, START_Y)
>         End If
>     End With
>
> ```
> and replace it with
> ```
>     ' Warp player away
>     Call SetPlayerDir(Index, DIR_DOWN)
>    
>     PlayerWarp Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)
>
> ```

Thanks alot :)
Link to comment
Share on other sites

@foxtrott:

> In Server source, in modPlayer under Sub OnDeath replace
>
> ```
>     ' Warp player away
>     Call SetPlayerDir(Index, DIR_DOWN)
>    
>         If .BootMap > 0 Then
>             PlayerWarp Index, .BootMap, .BootX, .BootY
>         Else
>             Call PlayerWarp(Index, START_MAP, START_X, START_Y)
>         End If
>     End With
>
> ```
> and replace it with
> ```
>     ' Warp player away
>     Call SetPlayerDir(Index, DIR_DOWN)
>    
>     PlayerWarp Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)
>
> ```

well I didn't get to try it till now sence i was gone and didn't work so oh well…
Link to comment
Share on other sites

@Carl:

> Basically is it possible to do that in VB6 and if there is could you help me find out how to do that?  :huh:

Wait, what? Why would you respawn at the place you die? That's like you're fighting a monster and you just pop back up? Easiest way would be to remove all this:
```
    ' Warp player away
    Call SetPlayerDir(Index, DIR_DOWN)

        If .BootMap > 0 Then
            PlayerWarp Index, .BootMap, .BootX, .BootY
        Else
            Call PlayerWarp(Index, START_MAP, START_X, START_Y)
        End If
    End With

```
@Grizzy:

> I feel like ur slightly having the same problem I am.. I just can't figure out how to change where they spawn at the start at.

Change START_MAP, START_X, START_Y to the values you want in modConstants server-side.
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...