20.05.2012, 14:06
Yeah you don't need commands for this.
For a faction to open the gate to this:
For a faction to open the gate to this:
pawn Код:
public CheckGate()
{
new mygate_status;
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i,10.0,closed_X,closed_Y,closed_Z))mygate_status=1;
}
if (GetPlayerTeam(playerid) == /*Your faction here*/
{
if(mygate_status)MoveObject(mygate, open_X, open_Y, open_Z,Moving Speed);
else MoveObject(mygate, closed_X, closed_Y, closed_Z, Moving Speed);
}
else
{
return 1;
}
}