26.11.2013, 08:27
Try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/og") == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 1354.28, -3439.05, 6.31))
{
MoveObject(AdminGate, 1354.28, -3440.25, 6.31, 2);
return 1;
}
}
if(strcmp(cmdtext, "/cg") == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 20, 1354.28, -3439.05, 6.31))
{
MoveObject(AdminGate, 1342.75, -3440.25, 6.31, 2);
return 1;
}
}
if(strcmp(cmdtext, "/ab") == 0)
{
SetPlayerPos(playerid, 1342.369018, -3435.039306, 4.463276);
return 1;
}
if(strcmp(cmdtext, "/ent") == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 365.7158, -9.8873, 1001.8516))
{
SetPlayerPos(playerid, 1021.908203,-3542.132324,4.277190);
SetPlayerInterior(playerid, 9);
}
else if (IsPlayerInRangeOfPoint(playerid, 5, 1021.908203,-3542.132324,4.277190))
{
SetPlayerPos(playerid, 365.7158, -9.8873, 1001.8516);
SetPlayerInterior(playerid, 0);
}
return 1;
}
return 0;
}