Really bad with playerrange[+REP] -
Mark_Weston - 21.02.2012
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?
Re: Really bad with playerrange[+REP] -
ReneG - 21.02.2012
Please go into more detail?
Re: Really bad with playerrange[+REP] -
Think - 21.02.2012
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(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);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2140.0405, 1362.4843, 10.8540)) { //2306.8481,-16.0682,26.7496
SetPlayerPos(playerid, /* Player Coordinates here */);
SetPlayerVirtualWorld(playerid, /* Player Virtual World here */);
}
Re: Really bad with playerrange[+REP] -
Mark_Weston - 21.02.2012
Quote:
Originally Posted by Think
Add another else if block;
PHP код:
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);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2140.0405, 1362.4843, 10.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 )
Re: Really bad with playerrange[+REP] -
JhnzRep - 22.02.2012
Give us the exit code
Re: Really bad with playerrange[+REP] -
Mark_Weston - 22.02.2012
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);
}
Re: Really bad with playerrange[+REP] -
JhnzRep - 22.02.2012
The code you showed should work.
Re: Really bad with playerrange[+REP] -
Mark_Weston - 22.02.2012
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...
Re: Really bad with playerrange[+REP] -
JhnzRep - 22.02.2012
Get the coordinates of the entrance, and the the interior. Then post it here.
Re: Really bad with playerrange[+REP] -
Mark_Weston - 22.02.2012
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