PDA

View Full Version : Is there a way if a player fell out of map?


Ritzy2K
18/11/2017, 02:14 PM
Okay so sometimes it happens that when a player is getting spawned due to whatever reasons he fells out of map and ends up in blueberry bugged with CJ skin.
Is there any way to detect that and to respawn it if he's felling down?
Also, how to avoid this issue? I have new spawning coords and changed them several times and this issue arises randomly out of blue

Eoussama
18/11/2017, 02:21 PM
Check if the player is falling with animation,
get the ground Z level on his current X and Y position (I use colanders for precision),
Check if the player's Z coordinate is inferior to that of the ground level,

Ritzy2K
18/11/2017, 02:26 PM
Check if the player is falling with animation,
get the ground Z level on his current X and Y position (I use colanders for precision),
Check if the player's Z coordinate is inferior to that of the ground level,

What are some of the ways to avoid this bug? This issue wasn't present in the previous spawn coords. My spawn coords are a little modified, there's no custom objects, I even increased the value of z coord by 2 to let the world load below the player but this issue still occurs randomly.

Do you think I should do a timer which checks every one second to do what you said? Also how can I check if player is falling?

Ritzy2K
18/11/2017, 02:51 PM
I freeze the player for 3 seconds at "OnPlayerSpawn" but still this issue comes out randomly.

WillyP
18/11/2017, 03:04 PM
If your server is public, send me the IP and I'll join and rejoin a few times, what you're saying doesn't really make sense unless it's coding related

Ritzy2K
18/11/2017, 03:15 PM
If your server is public, send me the IP and I'll join and rejoin a few times, what you're saying doesn't really make sense unless it's coding related

I don't have it public yet, I'm working at it.

I've also noticed something strange -
Usually when a player spawns. I send him a ClientMessage.

But when the player falls off the map, the client message doesn't appear either. It's like - OnPlayerSpawn isn't called at all.

The player isn't armed either, but OnPlayerSpawn was supposed to arm him.

Is it a bug that OnPlayerSpawn isn't called everytime?

WillyP
18/11/2017, 03:20 PM
Possibly something in your code is conflicting with other parts causing the player to spawn somewhere different to where you have specified, as well as the lack of message and weapons. Can't really decipher the issue without having a go or looking at some coding

Ritzy2K
18/11/2017, 03:26 PM
Possibly something in your code is conflicting with other parts causing the player to spawn somewhere different to where you have specified, as well as the lack of message and weapons. Can't really decipher the issue without having a go or looking at some coding

It was a very very shitty issue.
Earlier the random spawning coordinates were 5
I decreased them to 3 but I forgot to adjust the "random" keyword.
So it was supposed to use 5 random coordinates but was having 3 so it was spawning me in blueberry when other 2 were called.
LOL, Stupid me. But thanks for trying to help means a lot.

Edit: I'm out of reps, I'll make sure to rep you.

WillyP
18/11/2017, 03:27 PM
Don't worry, we all make mistakes :p

wallee
18/11/2017, 03:51 PM
another potential fall out of map:

if you respawn a vehicle while a player is surfing on it he will be teleported to blueberry (0, 0, 0)