09.04.2011, 10:11
How do I do that the player came to a certain place and gates open?
forward AreaCheck();
public OnGameModeInit()
{
SetTimer("AreaCheck", 2000, true);
return 1;
}
public AreaCheck()
{
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, range, x, y, z)) //replace "range, x, y, z" with your object positions and the wished range
{
MoveObject(objectid, newx, newy, newz); //replace objectid, newx, newy, newz with your objectid and the new positions
}
}
}
return 1;
}