19.11.2013, 07:19
pawn Код:
new Gate;
new GateStatus;
public OnGameModeInit()
{
Gate = CreateObject(980, 1067.08704, 1359.38843, 12.29745, 0.00000, 0.00000, 0.00000);
return 1;
}
CMD:gate(playerid, params[])
{
new playername[24];
if( strfind( playername, "TAG", true) == -1 )
{
SendClientMessage( playerid, 0xFFFFFFFF, "...................");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1067.08704, 1359.38843, 12.29745))
{
if(GateStatus == 0)
{
MoveObject(Gate, 1067.08704, 1359.38843, 6.80000, 2.00);
GateStatus = 1;
}
else
{
MoveObject(Gate, 1067.08704, 1359.38843, 12.29745, 2.00);
GateStatus = 0;
}
}
return 1;
}