02.09.2010, 14:22
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gateopen", cmdtext, true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid,4.0,2705.8347167969, 657.30255126953, 11.070308685303))
{
MoveObject(mygate,2705.8347167969, 657.30255126953, 11.070308685303,3.0);
SendClientMessage(playerid,0xFFFF00FF,"You have just opened the Yard gate");
return 1;
}
else return SendClientMessage(playerid, 0xFFFF00FF, "You are not in range of point");
}
if (strcmp("/gateclose", cmdtext, true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid,4.0,2706.0078125, 652.048828125, 11.070308685303))
{
MoveObject(mygate,2706.0078125, 652.048828125, 11.070308685303,3.0);
SendClientMessage(playerid,0xFFFF00FF,"You have just closed the Yard gate");
return 1;
}
else return SendClientMessage(playerid, 0xFFFF00FF, "You are not in range of point");
}
}