like for example i have these two 24/7's assigned for the command /enter
Код:
if (PlayerToPoint(2.0, playerid,2247.5637,2396.6123,10.8203))//24/7 2 entrance
{
EnteredShop[playerid] = 3;//entered third 24/7
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,-26.6916,-55.7149,1003.5469);
}
if (PlayerToPoint(2.0, playerid,2187.9460,2469.8042,11.2422))//24/7 3 entrance
{
EnteredShop[playerid] = 1;//entered first 24/7
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,-26.6916,-55.7149,1003.5469);
}
and i have these two assigned for the command /exit
Код:
else if (EnteredShop[playerid] == 2 && PlayerToPoint(5.0, playerid,-26.6916,-55.7149,1003.5469))//second 24/7 exit
{
EnteredShop[playerid] = 0;//exited shop
SetPlayerPos(playerid,2097.6501,2224.4165,11.0234);
SetPlayerInterior(playerid,0);
}
else if (EnteredShop[playerid] == 3 && PlayerToPoint(5.0, playerid,-26.6916,-55.7149,1003.5469))//third 24/7 exit
{
EnteredShop[playerid] = 0;//exited shop
SetPlayerPos(playerid,2187.9460, 2469.8042, 11.2422);
SetPlayerInterior(playerid,0);
}
How do i determine which ones match up?