SA-MP Forums Archive
setplayer pos help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: setplayer pos help (/showthread.php?tid=209960)



setplayer pos help - yarrum3 - 11.01.2011

HI i don't know how to explane this verey well but i will try.

i want to have 2 buildings that go into the same interior and when i exit from one of the buildings it will take me back where i enter it and i want the the same for the other building but my problems is that they both go into the same interior and when i exit it will only take me to one of the point i think i need to use a virtual world. at the Monet all i can do is if(playerinrangeof x y z setplayerpos x y z but i want to different exit points to set me at depending on what building i entered at.


Re: setplayer pos help - yarrum3 - 09.02.2011

i have left this thread for about over a month and i thought i bump it up.


Re: setplayer pos help - hadzx - 09.02.2011

explane it better please


Re: setplayer pos help - yarrum3 - 09.02.2011

Well i want to buildings that take me in to the same interior but depending on what one i enter first it will tp me back to one off the buildings.


Re: setplayer pos help - MadeMan - 09.02.2011

First enter place:
pawn Код:
SetPVarInt(playerid, "Interior", 1);
Second enter place:
pawn Код:
SetPVarInt(playerid, "Interior", 2);
Exit:
pawn Код:
if(GetPVarInt(playerid, "Interior") == 1)
{
// first place
}
else if(GetPVarInt(playerid, "Interior") == 2)
{
// second place
}



Re: setplayer pos help - xRyder - 09.02.2011

I think you can use Virtual world (SetPlayerVirtualWorld).
And then when player exit's that building you can check IsPlayerInRangeOfPoint() and GetPlayerVirtualWorld() to see where you need to TP him.

Edit: Or, even better what MadeMan said.


Re: setplayer pos help - Mean - 10.02.2011

Quote:
Originally Posted by xRyder
Посмотреть сообщение
I think you can use Virtual world (SetPlayerVirtualWorld).
And then when player exit's that building you can check IsPlayerInRangeOfPoint() and GetPlayerVirtualWorld() to see where you need to TP him.

Edit: Or, even better what MadeMan said.
Isn't it interior?

pawn Код:
SetPlayerInterior( playerid, interiorid );