Quote:
Originally Posted by Fantje
PHP код:
new autogate;
Forward:
forward close();
On the bottom of the gamemode:
public close()
{
MoveObject(autogate,-308.49820, 1508.65869, 74.33560,3);
return 1;
}
Under GameModeInit:
autogate = CreateObject(987, -308.49820, 1508.65869, 74.33560, 0.00000, 0.00000, 0.00000);
Under OnPlayerUpdate:
public OnPlayerUpdate(playerid)
{
if(PlayerInfo[playerid][dRank] < 1 && IsPlayerInRangeOfPoint(playerid, 8, -308.49820, 1508.65869, 74.33560))
{
MoveObject(autogate, -308.49820, 1508.65869, 68.10109, 3);
SetTimer("close", 4000, 0);
}
return 1;
}
|
Why would you want to set a timer then open the gate, why not just open the gate under OnPlayerUpdate?