08.05.2014, 12:31
Whenever i put the command to open the gate, it just stands still, nothing happens.
pawn Код:
CMD:agate(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, 0xFFFFFFAA, "{627D80}Error: You are not allowed to use this.");
if(IsPlayerInRangeOfPoint(playerid, 10.0, 835.6018100, -1850.3188500, 11.4211000))
{
MoveObject(AGate, 835.6018100 ,-1850.3188500, 11.4211000 - 100.0, 5.0);
SendClientMessage(playerid, 0x71BBD1FF, "The gate has been opened, and will close in 5 seconds.");
AGateOpened[playerid] = 1;
KillTimer(ResetAGate[playerid]);
ResetAGate[playerid] = SetTimerEx("ResettingAGate", 5000, 0, "i", playerid);
}
return 1;
}
forward ResettingAGate(playerid);
public ResettingAGate(playerid)
{
AGateOpened[playerid] = 0;
MoveObject(AGate, 835.6018100 ,-1850.3188500, 11.4211000, 5.0);
return 1;
}