24.10.2009, 10:20
You should check all players.
pawn Код:
public Doors()
{
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerToPoint(1,i,-2026.5660,-102.0659,35.1641)) // DMV
{
SetPlayerInterior(i,3);
SetPlayerPos(i,1494.4567,1305.2220,1093.2891);
SetPlayerFacingAngle(i,359.6967);
return 1;
}
else if(PlayerToPoint(1,i,1494.4486,1303.5806,1093.2891))
{
SetPlayerInterior(i,0);
SetPlayerPos(i,-2026.5931,-100.3700,35.1641);
SetPlayerFacingAngle(i,360);
return 1;
}
return 1;
}
}
}