Really bad with playerrange[+REP]
#1

Hey there, I am trying to do two banks, in two different citys.

This is the one for FC.

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, -179.188339,1133.098266,19.742187)) {
            SetPlayerPos(playerid, 2325.0097, 2369.2297, 2022.9257);
            SetPlayerVirtualWorld(playerid, 3);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2325.0097,2369.2297,2022.9257)) {  //2306.8481,-16.0682,26.7496
            SetPlayerPos(playerid, -179.188339,1133.098266,19.742187);
            SetPlayerVirtualWorld(playerid, 0);
        }
I also want to add this cord
Код:
2140.0405, 1362.4843, 10.8540, 177.8677
how would I do that?
Reply
#2

Please go into more detail?
Reply
#3

Quote:
Originally Posted by Mark_Weston
Посмотреть сообщение
Hey there, I am trying to do two banks, in two different citys.

This is the one for FC.

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, -179.188339,1133.098266,19.742187)) {
            SetPlayerPos(playerid, 2325.0097, 2369.2297, 2022.9257);
            SetPlayerVirtualWorld(playerid, 3);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2325.0097,2369.2297,2022.9257)) {  //2306.8481,-16.0682,26.7496
            SetPlayerPos(playerid, -179.188339,1133.098266,19.742187);
            SetPlayerVirtualWorld(playerid, 0);
        }
I also want to add this cord
Код:
2140.0405, 1362.4843, 10.8540, 177.8677
how would I do that?
Add another else if block;

PHP код:
        if(IsPlayerInRangeOfPoint(playerid2.0, -179.188339,1133.098266,19.742187)) {
            
SetPlayerPos(playerid2325.00972369.22972022.9257);
            
SetPlayerVirtualWorld(playerid3);
        }
        else if(
IsPlayerInRangeOfPoint(playerid2.02325.0097,2369.2297,2022.9257)) {  //2306.8481,-16.0682,26.7496
            
SetPlayerPos(playerid, -179.188339,1133.098266,19.742187);
            
SetPlayerVirtualWorld(playerid0);
        }
        else if(
IsPlayerInRangeOfPoint(playerid2.02140.04051362.484310.8540)) {  //2306.8481,-16.0682,26.7496
            
SetPlayerPos(playerid/* Player Coordinates here */);
            
SetPlayerVirtualWorld(playerid/* Player Virtual World here */);
        } 
Reply
#4

Quote:
Originally Posted by Think
Посмотреть сообщение
Add another else if block;

PHP код:
        if(IsPlayerInRangeOfPoint(playerid2.0, -179.188339,1133.098266,19.742187)) {
            
SetPlayerPos(playerid2325.00972369.22972022.9257);
            
SetPlayerVirtualWorld(playerid3);
        }
        else if(
IsPlayerInRangeOfPoint(playerid2.02325.0097,2369.2297,2022.9257)) {  //2306.8481,-16.0682,26.7496
            
SetPlayerPos(playerid, -179.188339,1133.098266,19.742187);
            
SetPlayerVirtualWorld(playerid0);
        }
        else if(
IsPlayerInRangeOfPoint(playerid2.02140.04051362.484310.8540)) {  //2306.8481,-16.0682,26.7496
            
SetPlayerPos(playerid/* Player Coordinates here */);
            
SetPlayerVirtualWorld(playerid/* Player Virtual World here */);
        } 
One problem. If I enter at the last code I exit at FC bank, and not at LV bank. ( If I enter at LV bank and exit it, it sends me to FC bank exit point )
Reply
#5

Give us the exit code
Reply
#6

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
Give us the exit code
As far as I know


pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, -179.188339,1133.098266,19.742187)) { //fc entrance
            SetPlayerPos(playerid, 2325.0097, 2369.2297, 2022.9257);  //bank interior door
            SetPlayerVirtualWorld(playerid, 3);
        }

        else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2325.0097,2369.2297,2022.9257)) {  //bank interior door
            SetPlayerPos(playerid, -179.188339,1133.098266,19.742187); //send back to fc entrance
            SetPlayerVirtualWorld(playerid, 0);
        }
Reply
#7

The code you showed should work.
Reply
#8

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
The code you showed should work.
because its the original one, I stated it on the first post.

I said I want 'two banks' in 'two different city's' or one in a county and on in a city...
Reply
#9

Get the coordinates of the entrance, and the the interior. Then post it here.
Reply
#10

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
Get the coordinates of the entrance, and the the interior. Then post it here.
Entrance:2140.0405, 1362.4843, 10.8540, 177.8677

Interior:2325.0097, 2369.2297, 2022.9257
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)