31.12.2013, 22:00
Here's my script, it's not working properly - gate opens but never comes back.
pawn Код:
CMD:westman(playerid, params[])
{
if(WestStatus == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2313.5000000,-1218.0999800,22.7000000))
{
MoveObject(WestGate1, 2313.5000000,-1218.0999800,19.2000000, 5);
SendClientMessage(playerid, 0xEF994300, "The gate is opening!");
WestStatus = 1;
}
else
{
SendClientMessage(playerid, 0xEF994300, "You are not in range of the gate!");
}
}
else if(WestStatus == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2313.5000000,-1218.0999800,22.7000000))
{
MoveObject(WestGate1, 1544.6600341797, -1623.9599609375, 13.10000038147, 5);
SendClientMessage(playerid, 0xEF994300, "The gate is closing!");
WestStatus = 0;
}
else
{
SendClientMessage(playerid, 0xEF994300, "You are not in range of a gate!");
}
}
return 1;
}
