28.07.2012, 10:51
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -2718.7581,-318.1504,7.8438))
{
SetPlayerPos(playerid,-27.2596,-158.7045,1011.7094);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, -2665.6848,-7.8725,6.1328 ))
{
SetPlayerPos(playerid,53.3778,-188.6606,998.3098);
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-2717.7808,52.1632,4.3359))
{
SetPlayerPos(playerid,772.111999,-3.898649,1000.728820);
SetPlayerInterior(playerid, 5);//gym
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, -27.2596,-158.7045,1011.7094 ))
{
SetPlayerPos(playerid,-2718.7581,-318.1504,7.8438);//college
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 53.3778,-188.6606,998.3098 ))
{
SetPlayerPos(playerid,-2665.6848,-7.8725,6.1328);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 772.111999,-3.898649,1000.728820))
{
SetPlayerPos(playerid,-2717.7808,52.1632,4.3359);
SetPlayerInterior(playerid, 0);//gym
}
}
return 1;
}
return 1;
}