Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext,"/enter",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,8,2045.5084228516,-1908.2283935547,12.99134349823))
{
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,2451.77,-1699.80,1013.51);
return 1;
}
}
if (strcmp(cmdtext,"/exit",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,8,2451.77,-1699.80,1013.51))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2045.5084228516,-1908.2283935547,12.99134349823);
return 1;
}
}
pawn Код:
if (strcmp(cmdtext,"/exit",true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,8,2451.77,-1699.80,1013.51))
{
SetPlayerPos(playerid,2045.5084228516,-1908.2283935547,12.99134349823);
return 1;
}
}