02.12.2012, 11:46
This is to open the barrier at LSPD but when i open it ingame nothing happens Please help!
I'm using this code:
I'm using this code:
pawn Код:
if(newkeys & KEY_CROUCH && !(oldkeys & KEY_CROUCH)) //horn
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerToPoint(15.0,playerid,1544.3,-1627.3,13.3)) //near barrier
{
if(IsACop(playerid) || PlayerInfo[playerid][pAdmin] & ADMIN_ACCESS)
{
if(barrier_to_garage == 0)
{
MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 180, 180, 1.5);
barrier_to_garage = 1;
return 1;
}
else
{
MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 180, 90, 1.5);
barrier_to_garage = 0;
return 1;
}
}
}