Z Position
#1

I can't seem to set a player's position under the ground.

Here's my code:
pawn Код:
SetPlayerPos(playerid, 2000.310457, -1451.558857, -1500.0);
Anything wrong with it?
Reply
#2

Can't do it. Game mechanics will respawn you if you go below a certain point.
Reply
#3

Going under the ground will set your position somewhere close. What do you want to do anyways?
Reply
#4

Quote:
Originally Posted by Skribblez
Посмотреть сообщение
I can't seem to set a player's position under the ground.

Here's my code:
pawn Код:
SetPlayerPos(playerid, 2000.310457, -1451.558857, -1500.0);
Anything wrong with it?
Why would you put someone underground? Anyway, you can, if you freeze that player after teleporting them to that position (assuming your code really teleports that player underground):

pawn Код:
TogglePlayerControllable(playerid, 0);
SetPlayerPos(playerid, 2000.310457, -1451.558857, -1500.0);
//Edited.
Reply
#5

Quote:
Originally Posted by ProjectMan
Посмотреть сообщение
Why would you put someone underground? Anyway, you can, if you freeze that player after teleporting them to that position (assuming your code really teleports that player underground):

pawn Код:
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid, 2000.310457, -1451.558857, -1500.0);
0 freezes, 1 unfreezes.
Reply
#6

Well, I'm coding a hospital system and whenever a player is hospitalized their camera position would be set to the area of the hospital but of course their body shouldn't be seen. I'm pretty sure it worked before.

Any work-around for this? Thanks.

Quote:
Originally Posted by ProjectMan
Посмотреть сообщение
Why would you put someone underground? Anyway, you can, if you freeze that player after teleporting them to that position (assuming your code really teleports that player underground):

pawn Код:
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid, 2000.310457, -1451.558857, -1500.0);
You mean TogglePlayerControllable(playerid, 0);?
Reply
#7

ProjectMan is right, you can also set the player's position inside a building somewhere close if the player doesn't fall.
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
0 freezes, 1 unfreezes.
Quote:
Originally Posted by Skribblez
Посмотреть сообщение
Well, I'm coding a hospital system and whenever a player is hospitalized their camera position would be set to the area of the hospital but of course their body shouldn't be seen. I'm pretty sure it worked before.

Any work-around for this? Thanks.


You mean TogglePlayerControllable(playerid, 0);?
Yes, I do mean that. Sorry. xD
Reply
#9

Quote:
Originally Posted by Kutter
Посмотреть сообщение
ProjectMan is right, you can also set the player's position inside a building somewhere close if the player doesn't fall.
I've thought of that, but wouldn't it ruin the player's camera position since it has to sync with the player's actual position? I'll give it a shot though.

EDIT: Also, changing the player's virtual world is an option, right?
Reply
#10

When I changed the player's position to inside a building (different from the camera position), the visual looks blurry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)