17.10.2009, 15:48
ppl i have a problem with my gates a i have all timers news and allthings but when im near one gate it open all gates here is my code:
pawn Код:
public gate(playerid)
{
for(new i = 0; i < GetMaxPlayers(); i++)
if(PlayerInfo[playerid][pTeam] == 3 || (PlayerInfo[playerid][pAdmin] == 10))
{
{
if(PlayerToPoint(6.5, i, 1954.939453, 1747.778320, 13.000000) && OpenGate[i] == 0 || OpenGate[playerid] == 1)
{
MoveObject(Portao12, 1954.939453, 1747.778320, 1.000000, 7.5);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(6.5, i, 1954.939453, 1747.778320, 13.000000) && OpenGate[i] == 0 || OpenGate[playerid] == 1)
{
MoveObject(Portao12, 1954.939453, 1747.778320, 13.000000, 7.5);
OpenGate[i] = 0;
}
}
}
}
public gate2(playerid)
{
for(new i = 0; i < GetMaxPlayers(); i++)
if(PlayerInfo[playerid][pTeam] == 3 || (PlayerInfo[playerid][pAdmin] == 10))
{
{
if(PlayerToPoint(6.5, i, 2293.847,2948.374,5.768) && OpenGate[i] == 0 || OpenGate[playerid] == 1)
{
MoveObject(Portao13, 2293.847,2510.374,5.768, 7.5);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(6.5, i, 2293.847,2948.374,5.768) && OpenGate[i] == 0 || OpenGate[playerid] == 1)
{
MoveObject(Portao13, 2293.847,2948.374,5.768, 7.5);
OpenGate[i] = 0;
}
}
}
}