30.07.2012, 17:41
Try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,-2803.80004883,-479.10000610,6.19999981))
{
MoveObject(cgate,-2798.00000000,-471.60000610,5.79999981,1);
}
return 1;
}
if (strcmp("/closegate", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,-2798.00000000,-471.60000610,6.19999981))
{
MoveObject(cgate,-2798.00000000,-471.60000610,6.19999981,1);
}
return 1;
}
return 0;
}