26.02.2010, 17:11
that automatic gate coordinate idk where to put i
//Gate variable and forward
new gate;
forward gateTimer(playerid);
//Object and timer at OnGameModeInit/OnFilterScriptInit
gate = CreateObject(976, 211.22889709473, -1447.3885498047, 12.159649848938, 0, 0, 230.97595214844);
SetTimer("gateTimer", 1000, 1);
//Add this callback where you want but not inside another callback!!
public gateTimer()
{
if(IsPlayerInRangeOfPoint(playerid, 10, 211.22889709473, -1447.3885498047, 12.15964984893)
{
MoveObject(gate, 205.57905578613, -1454.2342529297, 12.159649848938, 5);
}else{
MoveObject(gate, 211.22889709473, -1447.3885498047, 12.159649848938, 5);
}
}
//Gate variable and forward
new gate;
forward gateTimer(playerid);
//Object and timer at OnGameModeInit/OnFilterScriptInit
gate = CreateObject(976, 211.22889709473, -1447.3885498047, 12.159649848938, 0, 0, 230.97595214844);
SetTimer("gateTimer", 1000, 1);
//Add this callback where you want but not inside another callback!!
public gateTimer()
{
if(IsPlayerInRangeOfPoint(playerid, 10, 211.22889709473, -1447.3885498047, 12.15964984893)
{
MoveObject(gate, 205.57905578613, -1454.2342529297, 12.159649848938, 5);
}else{
MoveObject(gate, 211.22889709473, -1447.3885498047, 12.159649848938, 5);
}
}