16.11.2011, 09:59
Hey! I used one of the newest tutorials for automatic gate.. I used it for door as well..
Everything worked fine.. till I tried to make that only you're using car for gate or only on foot for door the gate/door will open..
and only if you're a cop it will open..
but! after I did that! the gate or the door doesnt move at all!
anyway.. here's the publics:
If someone can help me! THANKS!
Everything worked fine.. till I tried to make that only you're using car for gate or only on foot for door the gate/door will open..
and only if you're a cop it will open..
but! after I did that! the gate or the door doesnt move at all!
anyway.. here's the publics:
pawn Код:
public PDdoorcheck()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
{
if(IsPlayerInRangeOfPoint(i, 2.0, 1584.3352, -1637.8557, 12.3400))
{
if (PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
if(pddooropen == false)
{
MoveObject(pddoor, 1582.6152, -1637.8557, 12.3400, 2.0);
pddooropen = true;
}
if(pddooropen == true)
{
MoveObject(pddoor, 1584.3352, -1637.8557, 12.3400, 2.0);
pddooropen = false;
}
}
else
{
SendClientMessage(i,COLOR_GREY,"You are not a Cop!, You better leave or be arrested!.");
}
}
}
}
return 1;
}
public GateCheck()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerInAnyVehicle(i))
{
if(IsPlayerInRangeOfPoint(i, 5.0, 1588.5841, -1638.3521, 13.7000))
{
if (PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
if(gateopen == false)
{
MoveObject(gate, 1597.4628, -1638.3291, 13.7000, 3.5);
gateopen = true;
}
if(gateopen == true)
{
MoveObject(gate, 1588.5841, -1638.3521, 13.7000, 3.5);
gateopen = false;
}
}
else
{
SendClientMessage(i,COLOR_GREY,"You are not a Cop!, You better leave or be arrested!.");
}
}
}
}
return 1;
}
If someone can help me! THANKS!