SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/09/2017, 01:02 PM   #21
RoX123
Big Clucker
 
Join Date: Apr 2017
Posts: 83
Reputation: 1
Default Re: warning 225: unreachable code Problem

Quote:
Originally Posted by JasonRiggs View Post
Ahh now I knew the reason of that, Replace this code with your whole OnPlayerKeyStateChange

PHP Code:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
string[128];
    new 
sendername[MAX_PLAYER_NAME];
    new 
newcar GetPlayerVehicleID(playerid);
    if(
newkeys == KEY_JUMP)
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
IsPlayerConnected(playerid))
            {
                if(!
engineOn[GetPlayerVehicleID(playerid)])
                {
                    if(
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
                    {
                        return 
1;
                    }
                    if(
IsAnOwnableCar(newcar))
                    {
                        if(
PlayerInfo[playerid][pPcarkey] == newcar) { }
                        else if(
PlayerInfo[playerid][pPcarkey2] == newcar) { }
                        else if(
PlayerInfo[playerid][pPcarkey3] == newcar) { }
                        else { return 
1; }
                    }
                    if(
newcar >= 321 && newcar <= 383)
                    {
                        if(
HireCar[playerid] != newcar)
                        {
                            return 
1;
                        }
                    }
                    if(
IsAHarvest(newcar))
                    {
                        return 
1;
                    }
                    if(
IsAPlane(newcar))
                    {
                        return 
1;
                    }
                    if(
gEngine[playerid] == 1) { return 1; }

                    
PutPlayerInVehicle(playeridnewcar0);
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
format(stringsizeof(string), "* %s okrece kljuc i pokusava da startuje motor vozila."sendername);
                    
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SetTimerEx("StartingTheVehicle",1000,0,"i",playerid);
                    
GameTextForPlayer(playerid"~w~Motor vozila se pali...",1000,3);
                    
gEngine[playerid] = 1;
                    return 
1;
                }
            }
        }
    }
    else if(
newkeys == KEY_SECONDARY_ATTACK)
    {
        if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(
gEngine[playerid] == && engineOn[newcar] == 0)
            {
                
RemovePlayerFromVehicle(playerid);
                
TogglePlayerControllable(playerid1);
                return 
1;
            }
            else if(
NoFuel[playerid] == 1)
            {
                
TogglePlayerControllable(playerid1);
                
RemovePlayerFromVehicle(playerid);
                
NoFuel[playerid] = 0;
                return 
1;
            }
        }
                  if( 
IsPlayerInRangeOfPointplayerid3.01480.9410,-1771.8586,18.7958 ) )
                  {
                  
SetPlayerPosplayerid386.2978,173.8582,1008.3828 );
                  
SetPlayerInteriorplayerid15 );
                  
GameTextForPlayerplayerid"Welcome to city hall"3000);
                  return 
1;
                  }
                  else if( 
IsPlayerInRangeOfPointplayerid3.0386.2978,173.8582,1008.3828 ) )
                  {
                  
SetPlayerPosplayerid1480.9410,-1771.8586,18.7958 );
                  
SetPlayerInteriorplayerid0);
                  
GameTextForPlayerplayerid"Goodbye"3000);
                  return 
1;
                  }        
    }
    if(
IsKeyJustDown(KEY_HANDBRAKE,newkeys,oldkeys))
    {
        
StopLoopingAnim(playerid);
        
TextDrawHideForPlayer(playerid,txtAnimHelper);
        
animation[playerid] = 0;
    }
    if((
newkeys == KEY_JUMP KEY_SPRINT))
    {
         
ApplyAnimation(playerid,"PED","IDLE_tired",3.0,0,1,1,0,5000,1);
         
SendClientMessage(playerid0x00FF00FF"Pokusali ste da skocite dok ste trcali i uganuli ste clanak.");
      }
    if(
newkeys KEY_ACTION)
    {
        if(
PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
         {
            if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
                {
                    new 
Float:pXFloat:pYFloat:pZ;
                    
GetPlayerPos(playeridpXpYpZ);
                    new 
Float:vXFloat:vYFloat:vZ;
                    new 
Found 0;
                    new 
vid 0;
                    while((
vid MAX_VEHICLES) && (!Found))
                    {
                           
vid++;
                           
GetVehiclePos(vid,vX,vY,vZ);
                           if((
floatabs(pX vX) < 7.5) && (floatabs(pY vY) < 6.0) && (floatabs(pZ vZ) < 6.0) && (vid != GetPlayerVehicleID(playerid)))
                        {
                        
SetVehicleToRespawn(vid);
                        }
                    }
                    if(!
Found)
                       {

                    }
                }
            }
        }
    }

    if(
newkeys KEY_ACTION)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 4)
         {
            if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                    new 
Float:pXFloat:pYFloat:pZ;
                    
GetPlayerPos(playeridpXpYpZ);
                    new 
Float:vXFloat:vYFloat:vZ;
                    new 
Found 0;
                    new 
vid 0;
                    while((
vid MAX_VEHICLES) && (!Found))
                    {
                           
vid++;
                           
GetVehiclePos(vid,vX,vY,vZ);
                           if((
floatabs(pX vX) < 7.5) && (floatabs(pY vY) < 6.0) && (floatabs(pZ vZ) < 6.0) && (vid != GetPlayerVehicleID(playerid)))
                        {
                        
SetVehicleToRespawn(vid);
                        }
                    if(!
Found)
                       {

                    }
                }
            }
        }
    }
    if( 
newkeys == KEY_ACTION // POLICIJA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 1)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // SAJ
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // NACIONALNA GARDA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // SAOBRACAJNA POLICIJA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }

//////////////////////    pocetak kapija na C     ///////////////////////////////////////////////////////////////////////
if( newkeys == KEY_CROUCH // staro
{

     if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 3)
        {
            if (
PlayerToPoint(15playerid,1540.9569091797, -1627.785522460915.156204223633))
            {
                  
MoveDynamicObject(Pajkanigate,1540.95605469,-1627.78515625,9.606216433.0);
                  
SetTimer("GateClose5"70000);
                  
SendClientMessage(playeridCOLOR_BLUE,"Policijska kapija je otvorena zatvorice se za 7 sekundi.");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
//PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
            
}
        }

    if(
PlayerToPoint(10.0playerid,1245.50000000,-767.20001221,93.80000305)) // Yamaguchi KAPIJA
    
{
        if(
PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
        {
            if(
YAkapija == 0)
            {
            
MoveDynamicObject(YAkapijaZ1245.50000000,-767.20001221,98.699996953);
            
SendClientMessage(playeridCOLOR_BLUE,"Yamaguchi Kapija je otvorena .");
             
GetPlayerName(playeridsendernamesizeof(sendername));
             
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
             
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
YAkapija 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(YAkapijaZ1245.50000000,-767.20001221,93.800003053);
            
SendClientMessage(playeridCOLOR_BLUE,"Yamaguchi Kapija je otvorena.");
             
GetPlayerName(playeridsendernamesizeof(sendername));
             
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
               
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
YAkapija 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if(
PlayerToPoint(10.0playerid,-76.30,-352.70,3.20)) // Privatna Organizacija KAPIJA 1
    
{
        if(
PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        {
            if(
KlipaniK11 == 0)
            {
            
MoveDynamicObject(KlipaniK1, -76.30,-352.708.143);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK11 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(KlipaniK1, -76.30,-352.70,3.203);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK11 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if(
PlayerToPoint(10.0playerid,-2.40,-268.39,7.19)) // Privatna Organizacija KAPIJA 2
    
{
        if(
PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        {
            if(
KlipaniK22 == 0)
            {
            
MoveDynamicObject(KlipaniK2, -2.40,-268.39,11.693);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK22 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(KlipaniK2, -2.40,-268.39,7.193);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK22 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if (
PlayerToPoint(10.0playerid,785.33691406,-1152.38671875,30.84447670))
    {
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 8)
    {
            if(
RDTr == 0)
            {
            
// 15.3
            
MoveDynamicObject(RDT 785.33691406,-1152.38671875,30.84447670,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"GHS Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RDTr 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(RDT 785.33740234,-1152.38696289,25.34447670,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"GHS Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RDTr 0;
            return 
1;
            }
    }
    }
// ************
else if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
        {
            if (
PlayerToPoint(15playerid,1018.98553467,-931.27862549,42.00473785))
            {
                  
MoveDynamicObject(PSRgate,1018.98535156,-931.27832031,37.079437263.0);
                  
SetTimer("GateClose7"70000);
                  
SendClientMessage(playeridCOLOR_BLUE,"Parking Servis kapija je otvorena zatvorice se za 7 sekundi.");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s otvara kapiju Parking Servisa."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
//PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
            
}
        }
//---------------[ Bajkeri ]---------
else if (PlayerToPoint(10.0playerid,702.0849609375, -474.925781259.4608917236328))
    {
    if(
PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
            if(
Bajkeri1 == 0)
            {
            
// 15.3
            
MoveDynamicObject(Bajkeri 702.0849609375, -474.925781259.4608917236328,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bajkeri1 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(Bajkeri ,  702.08575439453,-474.92639160156,10.960891723633,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bajkeri1 0;
            return 
1;
            }
    }
    }
else if (
PlayerToPoint(10.0playerid,651.93359375, -452.9785156259.1636219024658))
    {
    if(
PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
            if(
Bikeri1 == 0)
            {
            
// 15.3
            
MoveDynamicObject(Bikeri 651.93359375, -452.9785156259.1636219024658,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bikeri1 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(Bikeri ,  651.93432617188,-452.97943115234,12.663621902466,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bikeri1 0;
            return 
1;
            }
    }
    }
//-----------------[ Kraj Bajker kapija ]---------------
//---------- PO 2
else if (PlayerToPoint(10.0playerid,2374.32128906,-808.71679688,133.54306030))
    {
    if(
PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)
    {
            if(
KucaPO2 == 0)
            {
            
// 15.3
            
MoveDynamicObject(KucaPO 2374.32128906,-808.71679688,133.54306030,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KucaPO2 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(KucaPO ,  2374.3215332031, -808.71704101563128.89419555664,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KucaPO2 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(2.0playerid,222.2,70.7,1005.4))//Vrata kancelarije lidera PD
    
{
        if(
gTeam[playerid] != 2)
        {
        
SendClientMessage(playeridCOLOR_GREY"   Niste policajac!");
        return 
1;
        }
               if(
OnDuty[playerid] != && PlayerInfo[playerid][pLeader] == 1)
            {
               
SendClientMessage(playeridCOLOR_GREY"   Niste na Duznosti!");
            return 
1;
            }
    if(
PlayerInfo[playerid][pLeader] == 1)
    {
                if( 
VrataPD == 0)
                {
                
MoveDynamicObject(VrataPDL ,222.2,70.7,1008.1,2.2);
                  
SendClientMessage(playeridCOLOR_BLUE,"Vrata kancelarije lidera otvorena .");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
VrataPD 1;
                  return 
1;
                  }
                  else
                  {
                
MoveDynamicObject(VrataPDL ,222.2,70.7,1005.4,2.0);
                  
SendClientMessage(playeridCOLOR_BLUE,"Vrata kancelarije lidera zatvorena .");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
VrataPD 0;
                  return 
1;

                  }
     }
     }
// *****************************************************************************
    
else if (PlayerToPoint(10.0playerid,302.84912109,-1554.92309570,32.15800095))
    {
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
    {
            if(
COB == 0)
            {
            
// 15.3
            
MoveDynamicObject(KapijaCobra 302.84912109,-1554.92309570,32.15800095,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
COB 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(KapijaCobra ,  309.23767090,-1558.12353516,32.15800095,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
COB 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid,1144.3000488281,-1292.5,13.39999961853))
    {
    if(
PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
    {
            if(
BolnicaRampaA == 0)
            {
            
DestroyDynamicObject(BolnicaRampa);
            
BolnicaRampa1 =     CreateDynamicObject(9681144.2998046875, -1292.513.399999618530347.999938964840);
            
SendClientMessage(playeridCOLOR_BLUE,"Bolnicarska Rampa je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
BolnicaRampaA 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(BolnicaRampa1);
            
BolnicaRampa =     CreateDynamicObject(9681144.3000488281, -1292.513.3999996185302700.000152587890625);
            
SendClientMessage(playeridCOLOR_BLUE,"Bolnicarska Rampa je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
BolnicaRampaA 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid,1418.59960938,-1652.29980469,13.19999981)) // automehanicar rampa 1
    
{
            if(
RampaMehanicar == 0)
            {
            
DestroyDynamicObject(RampaMehanicar1);
            
RampaMehanicar1o =     CreateDynamicObject(968,1418.59960938,-1652.29980469,13.19999981,0.00000000,0.00000000,90.00000000); // rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicar 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(RampaMehanicar1o);
            
RampaMehanicar1 =     CreateDynamicObject(968,1418.59960938,-1652.29980469,13.19999981,0.00000000,90.00000000,90.00000000); // rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicar 0;
            return 
1;
            }
    }
    else if (
PlayerToPoint(10.0playerid,1366.89941406,-1697.89941406,8.69999981)) // automehanicar rampa 2
    
{
    if(
PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12||PlayerInfo[playerid][pJob] == 7)
    {
            if(
RampaMehanicarr == 0)
            {
            
DestroyDynamicObject(RampaMehanicar2);
            
RampaMehanicar2o =     CreateDynamicObject(968,1366.89941406,-1697.89941406,8.69999981,0.00000000,0.00000000,303.99719238); //rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicarr 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(RampaMehanicar2o);
            
RampaMehanicar2 =     CreateDynamicObject(968,1366.89941406,-1697.89941406,8.69999981,0.00000000,90.00000000,303.99719238); //rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicarr 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid1019.48046875, -315.067382812574.313888549805))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pAdmin] == 1340)
    {
                if(
TecKapijaA == 0)
                {
                
MoveDynamicObject(TecKapija2,1015.40,-315.08,74.612.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Garaza La Cosa Nostral je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara garazu."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaA 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(TecKapija2,1019.48, -315.0674.312.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Garaza La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara garazu."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaA 0;
                   return 
1;
                   }
    }
     }
    else if (
PlayerToPoint(10.0playerid1027.7431640625, -366.81445312575.677352905273))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pAdmin] == 1340)
    {
                if(
TecKapijaB == 0)
                {
                
MoveDynamicObject(TecKapija1,1027.74,-366.81,80.172.00); //kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je otvorena i zatvorice se za 7 sekundi.");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaB 1;
                   return 
1;
                   }
                   else
                   {
                    
MoveDynamicObject(TecKapija1,1027.74, -366.8175.672.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaB 0;
                   return 
1;
                   }
    }
    }
    else if (
PlayerToPoint(10.0playerid1284.8892822266, -2056.3867187560.515785217285))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 6)
    {
                if(
LCNgate1 == 0)
                {
                
MoveDynamicObject(LCNGate,1284.888671875, -2056.3867187554.9905853271482.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostral je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
LCNgate1 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(LCNGate,1284.8892822266, -2056.3867187560.5157852172852.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
LCNgate1 0;
                   return 
1;
                   }
    }
     }
    else if (
PlayerToPoint(10.0playerid1590.29980469,-1638.00000000,15.05000019))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == 3)
    {
                if(
PDKapijaA == 0)
                {
                
MoveDynamicObject(PDKapija,1590.30004883,-1638.00000000,9.399999622.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija PD-a je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDKapijaA 1;
                   return 
1;
                   }
                   else
                   {
                
MoveDynamicObject(PDKapija,1590.29980469,-1638.00000000,15.050000192.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija PD-a je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDKapijaA 0;
                   return 
1;
                   }
     }
     }
     else if (
PlayerToPoint(3.0playerid250.50000000,62.40000153,1004.00000000))   //kordinate zatvorene kapije
     
{
     if(
PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
     {
                if (
PDVrataA == 0)
                {
                
MoveDynamicObject(PDVrata1,250.50000000,62.40000153,1006.700012212.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataA 1;
                   return 
1;
                   }
                   else
                   {
                   
MoveDynamicObject(PDVrata1,250.50000000,62.40000153,1004.000000002.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataA 0;
                   return 
1;
                   }

    }
    }
    else if (
PlayerToPoint(3.0playerid247.30000305,72.50000000,1004.00000000))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
    {
                if(
PDVrataB == 0)
                {
                
MoveDynamicObject(PDVrata2,247.30000305,72.50000000,1006.700012212.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataB 1;
                   return 
1;
                   }
                   else
                {
                   
MoveDynamicObject(PDVrata2,247.30000305,72.50000000,1004.000000002.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataB 0;
                   return 
1;
                   }

    }
    }
    else if (
PlayerToPoint(10.0playerid1812.791015625, -2072.038085937513.32569694519))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
    {
                if(
RuskaKapija == 0)
                {
                
MoveDynamicObject(RuskaKapija1,1812.7734375,-2062.47265625,13.3827667236332.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija Ruske Mafije je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
RuskaKapija 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(RuskaKapija1,1812.791015625,-2072.0380859375,13.325696945192.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija Ruske Mafije je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
RuskaKapija 0;
                   return 
1;
                   }
    }
    }

26 errors, i realy dont know what to do
RoX123 is offline   Reply With Quote
Old 11/09/2017, 01:07 PM   #22
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,251
Reputation: 525
Default

For the love of god, this is why copy-pasting code to people doesn't work.


Those stacked up if statements are BAD.
Sew_Sumi is offline   Reply With Quote
Old 11/09/2017, 01:10 PM   #23
RoX123
Big Clucker
 
Join Date: Apr 2017
Posts: 83
Reputation: 1
Default Re: warning 225: unreachable code Problem

Quote:
Originally Posted by Sew_Sumi View Post
Learn some.

The reason for the initial error has been the 2 if statements. That's making unreachable code because the first will encounter the return.

There'll be more compact and 'logical' checks to do, if you optimize the code, and don't copy and paste 'solutions' that are thrown around willy nilly on here.

The errors state what is the problem.

Where these 26 errors are occurring, look around the prior blocks of code. You'll have an issue in there.
I have code without errors but ingame it isnt work
RoX123 is offline   Reply With Quote
Old 11/09/2017, 01:12 PM   #24
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,251
Reputation: 525
Default Re: warning 225: unreachable code Problem

Quote:
Originally Posted by RoX123 View Post
I have code without errors but ingame it isnt work
What's the 26 errors then?

It's all to do with the if statements and copy-pasting sections of code to do things.
Sew_Sumi is offline   Reply With Quote
Old 11/09/2017, 01:15 PM   #25
JasonRiggs
Gangsta
 
Join Date: Jul 2016
Location: My bedroom.
Posts: 780
Reputation: 47
Default Re: warning 225: unreachable code Problem

PHP Code:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
string[128];
    new 
sendername[MAX_PLAYER_NAME];
    new 
newcar GetPlayerVehicleID(playerid);
    if(
newkeys == KEY_JUMP)
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
IsPlayerConnected(playerid))
            {
                if(!
engineOn[GetPlayerVehicleID(playerid)])
                {
                    if(
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
                    {
                        return 
1;
                    }
                    if(
IsAnOwnableCar(newcar))
                    {
                        if(
PlayerInfo[playerid][pPcarkey] == newcar) { }
                        else if(
PlayerInfo[playerid][pPcarkey2] == newcar) { }
                        else if(
PlayerInfo[playerid][pPcarkey3] == newcar) { }
                        else { return 
1; }
                    }
                    if(
newcar >= 321 && newcar <= 383)
                    {
                        if(
HireCar[playerid] != newcar)
                        {
                            return 
1;
                        }
                    }
                    if(
IsAHarvest(newcar))
                    {
                        return 
1;
                    }
                    if(
IsAPlane(newcar))
                    {
                        return 
1;
                    }
                    if(
gEngine[playerid] == 1) { return 1; }

                    
PutPlayerInVehicle(playeridnewcar0);
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
format(stringsizeof(string), "* %s okrece kljuc i pokusava da startuje motor vozila."sendername);
                    
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SetTimerEx("StartingTheVehicle",1000,0,"i",playerid);
                    
GameTextForPlayer(playerid"~w~Motor vozila se pali...",1000,3);
                    
gEngine[playerid] = 1;
                    return 
1;
                }
            }
        }
    }
    else if(
newkeys == KEY_SECONDARY_ATTACK)
    {
        if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(
gEngine[playerid] == && engineOn[newcar] == 0)
            {
                
RemovePlayerFromVehicle(playerid);
                
TogglePlayerControllable(playerid1);
                return 
1;
            }
            else if(
NoFuel[playerid] == 1)
            {
                
TogglePlayerControllable(playerid1);
                
RemovePlayerFromVehicle(playerid);
                
NoFuel[playerid] = 0;
                return 
1;
            }
        }
                  if( 
IsPlayerInRangeOfPointplayerid3.01480.9410,-1771.8586,18.7958 ) )
                  {
                  
SetPlayerPosplayerid386.2978,173.8582,1008.3828 );
                  
SetPlayerInteriorplayerid15 );
                  
GameTextForPlayerplayerid"Welcome to city hall"3000);
                  return 
1;
                  }
                  else if( 
IsPlayerInRangeOfPointplayerid3.0386.2978,173.8582,1008.3828 ) )
                  {
                  
SetPlayerPosplayerid1480.9410,-1771.8586,18.7958 );
                  
SetPlayerInteriorplayerid0);
                  
GameTextForPlayerplayerid"Goodbye"3000);
                  return 
1;
                  }        
    }
    if(
IsKeyJustDown(KEY_HANDBRAKE,newkeys,oldkeys))
    {
        
StopLoopingAnim(playerid);
        
TextDrawHideForPlayer(playerid,txtAnimHelper);
        
animation[playerid] = 0;
    }
    if((
newkeys == KEY_JUMP KEY_SPRINT))
    {
         
ApplyAnimation(playerid,"PED","IDLE_tired",3.0,0,1,1,0,5000,1);
         
SendClientMessage(playerid0x00FF00FF"Pokusali ste da skocite dok ste trcali i uganuli ste clanak.");
      }
    if(
newkeys KEY_ACTION)
    {
        if(
PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
         {
            if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
                {
                    new 
Float:pXFloat:pYFloat:pZ;
                    
GetPlayerPos(playeridpXpYpZ);
                    new 
Float:vXFloat:vYFloat:vZ;
                    new 
Found 0;
                    new 
vid 0;
                    while((
vid MAX_VEHICLES) && (!Found))
                    {
                           
vid++;
                           
GetVehiclePos(vid,vX,vY,vZ);
                           if((
floatabs(pX vX) < 7.5) && (floatabs(pY vY) < 6.0) && (floatabs(pZ vZ) < 6.0) && (vid != GetPlayerVehicleID(playerid)))
                        {
                        
SetVehicleToRespawn(vid);
                        }
                    }
                    if(!
Found)
                       {

                    }
                }
            }
        }
    }

    if(
newkeys KEY_ACTION)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 4)
         {
            if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                    new 
Float:pXFloat:pYFloat:pZ;
                    
GetPlayerPos(playeridpXpYpZ);
                    new 
Float:vXFloat:vYFloat:vZ;
                    new 
Found 0;
                    new 
vid 0;
                    while((
vid MAX_VEHICLES) && (!Found))
                    {
                           
vid++;
                           
GetVehiclePos(vid,vX,vY,vZ);
                           if((
floatabs(pX vX) < 7.5) && (floatabs(pY vY) < 6.0) && (floatabs(pZ vZ) < 6.0) && (vid != GetPlayerVehicleID(playerid)))
                        {
                        
SetVehicleToRespawn(vid);
                        }
                    if(!
Found)
                       {

                    }
                }
            }
        }
    }
    if( 
newkeys == KEY_ACTION // POLICIJA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 1)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // SAJ
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // NACIONALNA GARDA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // SAOBRACAJNA POLICIJA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }

//////////////////////    pocetak kapija na C     ///////////////////////////////////////////////////////////////////////
if( newkeys == KEY_CROUCH // staro
{

     if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 3)
        {
            if (
PlayerToPoint(15playerid,1540.9569091797, -1627.785522460915.156204223633))
            {
                  
MoveDynamicObject(Pajkanigate,1540.95605469,-1627.78515625,9.606216433.0);
                  
SetTimer("GateClose5"70000);
                  
SendClientMessage(playeridCOLOR_BLUE,"Policijska kapija je otvorena zatvorice se za 7 sekundi.");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
//PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
            
}
        }

    if(
PlayerToPoint(10.0playerid,1245.50000000,-767.20001221,93.80000305)) // Yamaguchi KAPIJA
    
{
        if(
PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
        {
            if(
YAkapija == 0)
            {
            
MoveDynamicObject(YAkapijaZ1245.50000000,-767.20001221,98.699996953);
            
SendClientMessage(playeridCOLOR_BLUE,"Yamaguchi Kapija je otvorena .");
             
GetPlayerName(playeridsendernamesizeof(sendername));
             
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
             
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
YAkapija 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(YAkapijaZ1245.50000000,-767.20001221,93.800003053);
            
SendClientMessage(playeridCOLOR_BLUE,"Yamaguchi Kapija je otvorena.");
             
GetPlayerName(playeridsendernamesizeof(sendername));
             
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
               
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
YAkapija 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if(
PlayerToPoint(10.0playerid,-76.30,-352.70,3.20)) // Privatna Organizacija KAPIJA 1
    
{
        if(
PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        {
            if(
KlipaniK11 == 0)
            {
            
MoveDynamicObject(KlipaniK1, -76.30,-352.708.143);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK11 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(KlipaniK1, -76.30,-352.70,3.203);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK11 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if(
PlayerToPoint(10.0playerid,-2.40,-268.39,7.19)) // Privatna Organizacija KAPIJA 2
    
{
        if(
PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        {
            if(
KlipaniK22 == 0)
            {
            
MoveDynamicObject(KlipaniK2, -2.40,-268.39,11.693);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK22 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(KlipaniK2, -2.40,-268.39,7.193);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK22 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if (
PlayerToPoint(10.0playerid,785.33691406,-1152.38671875,30.84447670))
    {
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 8)
    {
            if(
RDTr == 0)
            {
            
// 15.3
            
MoveDynamicObject(RDT 785.33691406,-1152.38671875,30.84447670,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"GHS Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RDTr 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(RDT 785.33740234,-1152.38696289,25.34447670,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"GHS Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RDTr 0;
            return 
1;
            }
    }
    }
// ************
else if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
        {
            if (
PlayerToPoint(15playerid,1018.98553467,-931.27862549,42.00473785))
            {
                  
MoveDynamicObject(PSRgate,1018.98535156,-931.27832031,37.079437263.0);
                  
SetTimer("GateClose7"70000);
                  
SendClientMessage(playeridCOLOR_BLUE,"Parking Servis kapija je otvorena zatvorice se za 7 sekundi.");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s otvara kapiju Parking Servisa."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
//PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
            
}
        }
//---------------[ Bajkeri ]---------
else if (PlayerToPoint(10.0playerid,702.0849609375, -474.925781259.4608917236328))
    {
    if(
PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
            if(
Bajkeri1 == 0)
            {
            
// 15.3
            
MoveDynamicObject(Bajkeri 702.0849609375, -474.925781259.4608917236328,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bajkeri1 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(Bajkeri ,  702.08575439453,-474.92639160156,10.960891723633,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bajkeri1 0;
            return 
1;
            }
    }
    }
else if (
PlayerToPoint(10.0playerid,651.93359375, -452.9785156259.1636219024658))
    {
    if(
PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
            if(
Bikeri1 == 0)
            {
            
// 15.3
            
MoveDynamicObject(Bikeri 651.93359375, -452.9785156259.1636219024658,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bikeri1 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(Bikeri ,  651.93432617188,-452.97943115234,12.663621902466,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bikeri1 0;
            return 
1;
            }
    }
    }
//-----------------[ Kraj Bajker kapija ]---------------
//---------- PO 2
else if (PlayerToPoint(10.0playerid,2374.32128906,-808.71679688,133.54306030))
    {
    if(
PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)
    {
            if(
KucaPO2 == 0)
            {
            
// 15.3
            
MoveDynamicObject(KucaPO 2374.32128906,-808.71679688,133.54306030,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KucaPO2 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(KucaPO ,  2374.3215332031, -808.71704101563128.89419555664,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KucaPO2 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(2.0playerid,222.2,70.7,1005.4))//Vrata kancelarije lidera PD
    
{
        if(
gTeam[playerid] != 2)
        {
        
SendClientMessage(playeridCOLOR_GREY"   Niste policajac!");
        return 
1;
        }
               if(
OnDuty[playerid] != && PlayerInfo[playerid][pLeader] == 1)
            {
               
SendClientMessage(playeridCOLOR_GREY"   Niste na Duznosti!");
            return 
1;
            } 
     }
    if(
PlayerInfo[playerid][pLeader] == 1)
    {
                if( 
VrataPD == 0)
                {
                
MoveDynamicObject(VrataPDL ,222.2,70.7,1008.1,2.2);
                  
SendClientMessage(playeridCOLOR_BLUE,"Vrata kancelarije lidera otvorena .");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
VrataPD 1;
                  return 
1;
                  }
                  else
                  {
                
MoveDynamicObject(VrataPDL ,222.2,70.7,1005.4,2.0);
                  
SendClientMessage(playeridCOLOR_BLUE,"Vrata kancelarije lidera zatvorena .");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
VrataPD 0;
                  return 
1;

                  }
     }
// *****************************************************************************
    
else if (PlayerToPoint(10.0playerid,302.84912109,-1554.92309570,32.15800095))
    {
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
    {
            if(
COB == 0)
            {
            
// 15.3
            
MoveDynamicObject(KapijaCobra 302.84912109,-1554.92309570,32.15800095,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
COB 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(KapijaCobra ,  309.23767090,-1558.12353516,32.15800095,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
COB 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid,1144.3000488281,-1292.5,13.39999961853))
    {
    if(
PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
    {
            if(
BolnicaRampaA == 0)
            {
            
DestroyDynamicObject(BolnicaRampa);
            
BolnicaRampa1 =     CreateDynamicObject(9681144.2998046875, -1292.513.399999618530347.999938964840);
            
SendClientMessage(playeridCOLOR_BLUE,"Bolnicarska Rampa je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
BolnicaRampaA 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(BolnicaRampa1);
            
BolnicaRampa =     CreateDynamicObject(9681144.3000488281, -1292.513.3999996185302700.000152587890625);
            
SendClientMessage(playeridCOLOR_BLUE,"Bolnicarska Rampa je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
BolnicaRampaA 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid,1418.59960938,-1652.29980469,13.19999981)) // automehanicar rampa 1
    
{
            if(
RampaMehanicar == 0)
            {
            
DestroyDynamicObject(RampaMehanicar1);
            
RampaMehanicar1o =     CreateDynamicObject(968,1418.59960938,-1652.29980469,13.19999981,0.00000000,0.00000000,90.00000000); // rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicar 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(RampaMehanicar1o);
            
RampaMehanicar1 =     CreateDynamicObject(968,1418.59960938,-1652.29980469,13.19999981,0.00000000,90.00000000,90.00000000); // rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicar 0;
            return 
1;
            }
    }
    else if (
PlayerToPoint(10.0playerid,1366.89941406,-1697.89941406,8.69999981)) // automehanicar rampa 2
    
{
    if(
PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12||PlayerInfo[playerid][pJob] == 7)
    {
            if(
RampaMehanicarr == 0)
            {
            
DestroyDynamicObject(RampaMehanicar2);
            
RampaMehanicar2o =     CreateDynamicObject(968,1366.89941406,-1697.89941406,8.69999981,0.00000000,0.00000000,303.99719238); //rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicarr 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(RampaMehanicar2o);
            
RampaMehanicar2 =     CreateDynamicObject(968,1366.89941406,-1697.89941406,8.69999981,0.00000000,90.00000000,303.99719238); //rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicarr 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid1019.48046875, -315.067382812574.313888549805))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pAdmin] == 1340)
    {
                if(
TecKapijaA == 0)
                {
                
MoveDynamicObject(TecKapija2,1015.40,-315.08,74.612.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Garaza La Cosa Nostral je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara garazu."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaA 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(TecKapija2,1019.48, -315.0674.312.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Garaza La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara garazu."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaA 0;
                   return 
1;
                   }
    }
     }
    else if (
PlayerToPoint(10.0playerid1027.7431640625, -366.81445312575.677352905273))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pAdmin] == 1340)
    {
                if(
TecKapijaB == 0)
                {
                
MoveDynamicObject(TecKapija1,1027.74,-366.81,80.172.00); //kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je otvorena i zatvorice se za 7 sekundi.");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaB 1;
                   return 
1;
                   }
                   else
                   {
                    
MoveDynamicObject(TecKapija1,1027.74, -366.8175.672.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaB 0;
                   return 
1;
                   }
    }
    }
    else if (
PlayerToPoint(10.0playerid1284.8892822266, -2056.3867187560.515785217285))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 6)
    {
                if(
LCNgate1 == 0)
                {
                
MoveDynamicObject(LCNGate,1284.888671875, -2056.3867187554.9905853271482.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostral je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
LCNgate1 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(LCNGate,1284.8892822266, -2056.3867187560.5157852172852.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
LCNgate1 0;
                   return 
1;
                   }
    }
     }
    else if (
PlayerToPoint(10.0playerid1590.29980469,-1638.00000000,15.05000019))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == 3)
    {
                if(
PDKapijaA == 0)
                {
                
MoveDynamicObject(PDKapija,1590.30004883,-1638.00000000,9.399999622.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija PD-a je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDKapijaA 1;
                   return 
1;
                   }
                   else
                   {
                
MoveDynamicObject(PDKapija,1590.29980469,-1638.00000000,15.050000192.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija PD-a je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDKapijaA 0;
                   return 
1;
                   }
     }
     }
     else if (
PlayerToPoint(3.0playerid250.50000000,62.40000153,1004.00000000))   //kordinate zatvorene kapije
     
{
     if(
PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
     {
                if (
PDVrataA == 0)
                {
                
MoveDynamicObject(PDVrata1,250.50000000,62.40000153,1006.700012212.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataA 1;
                   return 
1;
                   }
                   else
                   {
                   
MoveDynamicObject(PDVrata1,250.50000000,62.40000153,1004.000000002.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataA 0;
                   return 
1;
                   }

    }
    }
    else if (
PlayerToPoint(3.0playerid247.30000305,72.50000000,1004.00000000))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
    {
                if(
PDVrataB == 0)
                {
                
MoveDynamicObject(PDVrata2,247.30000305,72.50000000,1006.700012212.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataB 1;
                   return 
1;
                   }
                   else
                {
                   
MoveDynamicObject(PDVrata2,247.30000305,72.50000000,1004.000000002.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataB 0;
                   return 
1;
                   }

    }
    }
    else if (
PlayerToPoint(10.0playerid1812.791015625, -2072.038085937513.32569694519))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
    {
                if(
RuskaKapija == 0)
                {
                
MoveDynamicObject(RuskaKapija1,1812.7734375,-2062.47265625,13.3827667236332.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija Ruske Mafije je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
RuskaKapija 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(RuskaKapija1,1812.791015625,-2072.0380859375,13.325696945192.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija Ruske Mafije je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
RuskaKapija 0;
                   return 
1;
                   }
    }
    }

I've found some missing brackets, try now..
__________________
JasonRiggs is offline   Reply With Quote
Old 11/09/2017, 08:06 PM   #26
RoX123
Big Clucker
 
Join Date: Apr 2017
Posts: 83
Reputation: 1
Default Re: warning 225: unreachable code Problem

With this code i dont have problem, normal compile but, it dont work in game, but no errors, on other types i get 26 errors
PHP Code:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
string[128];
    new 
sendername[MAX_PLAYER_NAME];
    new 
newcar GetPlayerVehicleID(playerid);
    if(
newkeys == KEY_JUMP)
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
IsPlayerConnected(playerid))
            {
                if(!
engineOn[GetPlayerVehicleID(playerid)])
                {
                    if(
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
                    {
                        return 
1;
                    }
                    if(
IsAnOwnableCar(newcar))
                    {
                        if(
PlayerInfo[playerid][pPcarkey] == newcar) { }
                        else if(
PlayerInfo[playerid][pPcarkey2] == newcar) { }
                        else if(
PlayerInfo[playerid][pPcarkey3] == newcar) { }
                        else { return 
1; }
                    }
                    if(
newcar >= 321 && newcar <= 383)
                    {
                        if(
HireCar[playerid] != newcar)
                        {
                            return 
1;
                        }
                    }
                    if(
IsAHarvest(newcar))
                    {
                        return 
1;
                    }
                    if(
IsAPlane(newcar))
                    {
                        return 
1;
                    }
                    if(
gEngine[playerid] == 1) { return 1; }

                    
PutPlayerInVehicle(playeridnewcar0);
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
format(stringsizeof(string), "* %s okrece kljuc i pokusava da startuje motor vozila."sendername);
                    
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SetTimerEx("StartingTheVehicle",1000,0,"i",playerid);
                    
GameTextForPlayer(playerid"~w~Motor vozila se pali...",1000,3);
                    
gEngine[playerid] = 1;
                    return 
1;
                }
            }
        }
    }
    else if(
newkeys == KEY_SECONDARY_ATTACK)
    {
        if(
GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(
gEngine[playerid] == && engineOn[newcar] == 0)
            {
                
RemovePlayerFromVehicle(playerid);
                
TogglePlayerControllable(playerid1);
                return 
1;
            }
            else if(
NoFuel[playerid] == 1)
            {
                
TogglePlayerControllable(playerid1);
                
RemovePlayerFromVehicle(playerid);
                
NoFuel[playerid] = 0;
                return 
1;
            }
        }
    }
    if(
IsKeyJustDown(KEY_HANDBRAKE,newkeys,oldkeys))
    {
        
StopLoopingAnim(playerid);
        
TextDrawHideForPlayer(playerid,txtAnimHelper);
        
animation[playerid] = 0;
    }
    if((
newkeys == KEY_JUMP KEY_SPRINT))
    {
         
ApplyAnimation(playerid,"PED","IDLE_tired",3.0,0,1,1,0,5000,1);
         
SendClientMessage(playerid0x00FF00FF"Pokusali ste da skocite dok ste trcali i uganuli ste clanak.");
      }
    if(
newkeys KEY_ACTION)
    {
        if(
PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
         {
            if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
                {
                    new 
Float:pXFloat:pYFloat:pZ;
                    
GetPlayerPos(playeridpXpYpZ);
                    new 
Float:vXFloat:vYFloat:vZ;
                    new 
Found 0;
                    new 
vid 0;
                    while((
vid MAX_VEHICLES) && (!Found))
                    {
                           
vid++;
                           
GetVehiclePos(vid,vX,vY,vZ);
                           if((
floatabs(pX vX) < 7.5) && (floatabs(pY vY) < 6.0) && (floatabs(pZ vZ) < 6.0) && (vid != GetPlayerVehicleID(playerid)))
                        {
                        
SetVehicleToRespawn(vid);
                        }
                    }
                    if(!
Found)
                       {

                    }
                }
            }
        }
    }

    if(
newkeys KEY_ACTION)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 4)
         {
            if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                    new 
Float:pXFloat:pYFloat:pZ;
                    
GetPlayerPos(playeridpXpYpZ);
                    new 
Float:vXFloat:vYFloat:vZ;
                    new 
Found 0;
                    new 
vid 0;
                    while((
vid MAX_VEHICLES) && (!Found))
                    {
                           
vid++;
                           
GetVehiclePos(vid,vX,vY,vZ);
                           if((
floatabs(pX vX) < 7.5) && (floatabs(pY vY) < 6.0) && (floatabs(pZ vZ) < 6.0) && (vid != GetPlayerVehicleID(playerid)))
                        {
                        
SetVehicleToRespawn(vid);
                        }
                    if(!
Found)
                       {

                    }
                }
            }
        }
    }
    if( 
newkeys == KEY_ACTION // POLICIJA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 1)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // SAJ
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // NACIONALNA GARDA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }
    if( 
newkeys == KEY_ACTION // SAOBRACAJNA POLICIJA
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            if(
PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
            {
                
format(stringsizeof(string), "STOP POLICIJA! Molimo parkirajte Vase vozilo na sigurnom mestu!");
                
ProxDetector(30.0playeridstringCOLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
                   return 
1;
            }
        }
    }

//////////////////////    pocetak kapija na C     ///////////////////////////////////////////////////////////////////////
if( newkeys == KEY_CROUCH // staro
{

     if(
PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pMember] == 3)
        {
            if (
PlayerToPoint(15playerid,1540.9569091797, -1627.785522460915.156204223633))
            {
                  
MoveDynamicObject(Pajkanigate,1540.95605469,-1627.78515625,9.606216433.0);
                  
SetTimer("GateClose5"70000);
                  
SendClientMessage(playeridCOLOR_BLUE,"Policijska kapija je otvorena zatvorice se za 7 sekundi.");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
//PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
            
}
        }

    if(
PlayerToPoint(10.0playerid,1245.50000000,-767.20001221,93.80000305)) // Yamaguchi KAPIJA
    
{
        if(
PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
        {
            if(
YAkapija == 0)
            {
            
MoveDynamicObject(YAkapijaZ1245.50000000,-767.20001221,98.699996953);
            
SendClientMessage(playeridCOLOR_BLUE,"Yamaguchi Kapija je otvorena .");
             
GetPlayerName(playeridsendernamesizeof(sendername));
             
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
             
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
YAkapija 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(YAkapijaZ1245.50000000,-767.20001221,93.800003053);
            
SendClientMessage(playeridCOLOR_BLUE,"Yamaguchi Kapija je otvorena.");
             
GetPlayerName(playeridsendernamesizeof(sendername));
             
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
               
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
YAkapija 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if(
PlayerToPoint(10.0playerid,-76.30,-352.70,3.20)) // Privatna Organizacija KAPIJA 1
    
{
        if(
PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        {
            if(
KlipaniK11 == 0)
            {
            
MoveDynamicObject(KlipaniK1, -76.30,-352.708.143);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK11 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(KlipaniK1, -76.30,-352.70,3.203);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK11 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if(
PlayerToPoint(10.0playerid,-2.40,-268.39,7.19)) // Privatna Organizacija KAPIJA 2
    
{
        if(
PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        {
            if(
KlipaniK22 == 0)
            {
            
MoveDynamicObject(KlipaniK2, -2.40,-268.39,11.693);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK22 1;
               return 
1;
            }
               else
               {
            
MoveDynamicObject(KlipaniK2, -2.40,-268.39,7.193);
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "{0049FF}PO:{FFFFFF}%s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KlipaniK22 0;
               return 
1;
            }
           }
           return 
1;
      }
    else if (
PlayerToPoint(10.0playerid,785.33691406,-1152.38671875,30.84447670))
    {
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 8)
    {
            if(
RDTr == 0)
            {
            
// 15.3
            
MoveDynamicObject(RDT 785.33691406,-1152.38671875,30.84447670,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"GHS Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RDTr 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(RDT 785.33740234,-1152.38696289,25.34447670,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"GHS Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RDTr 0;
            return 
1;
            }
    }
    }
// ************
else if(PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 12)
        {
            if (
PlayerToPoint(15playerid,1018.98553467,-931.27862549,42.00473785))
            {
                  
MoveDynamicObject(PSRgate,1018.98535156,-931.27832031,37.079437263.0);
                  
SetTimer("GateClose7"70000);
                  
SendClientMessage(playeridCOLOR_BLUE,"Parking Servis kapija je otvorena zatvorice se za 7 sekundi.");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s otvara kapiju Parking Servisa."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
//PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
            
}
        }
//---------------[ Bajkeri ]---------
else if (PlayerToPoint(10.0playerid,702.0849609375, -474.925781259.4608917236328))
    {
    if(
PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
            if(
Bajkeri1 == 0)
            {
            
// 15.3
            
MoveDynamicObject(Bajkeri 702.0849609375, -474.925781259.4608917236328,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bajkeri1 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(Bajkeri ,  702.08575439453,-474.92639160156,10.960891723633,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bajkeri1 0;
            return 
1;
            }
    }
    }
else if (
PlayerToPoint(10.0playerid,651.93359375, -452.9785156259.1636219024658))
    {
    if(
PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
            if(
Bikeri1 == 0)
            {
            
// 15.3
            
MoveDynamicObject(Bikeri 651.93359375, -452.9785156259.1636219024658,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bikeri1 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(Bikeri ,  651.93432617188,-452.97943115234,12.663621902466,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
Bikeri1 0;
            return 
1;
            }
    }
    }
//-----------------[ Kraj Bajker kapija ]---------------
//---------- PO 2
else if (PlayerToPoint(10.0playerid,2374.32128906,-808.71679688,133.54306030))
    {
    if(
PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)
    {
            if(
KucaPO2 == 0)
            {
            
// 15.3
            
MoveDynamicObject(KucaPO 2374.32128906,-808.71679688,133.54306030,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KucaPO2 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(KucaPO ,  2374.3215332031, -808.71704101563128.89419555664,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
KucaPO2 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(2.0playerid,222.2,70.7,1005.4))//Vrata kancelarije lidera PD
    
{
        if(
gTeam[playerid] != 2)
        {
        
SendClientMessage(playeridCOLOR_GREY"   Niste policajac!");
        return 
1;
        }
               if(
OnDuty[playerid] != && PlayerInfo[playerid][pLeader] == 1)
            {
               
SendClientMessage(playeridCOLOR_GREY"   Niste na Duznosti!");
            return 
1;
            }
    if(
PlayerInfo[playerid][pLeader] == 1)
    {
                if( 
VrataPD == 0)
                {
                
MoveDynamicObject(VrataPDL ,222.2,70.7,1008.1,2.2);
                  
SendClientMessage(playeridCOLOR_BLUE,"Vrata kancelarije lidera otvorena .");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
VrataPD 1;
                  return 
1;
                  }
                  else
                  {
                
MoveDynamicObject(VrataPDL ,222.2,70.7,1005.4,2.0);
                  
SendClientMessage(playeridCOLOR_BLUE,"Vrata kancelarije lidera zatvorena .");
                  
GetPlayerName(playeridsendernamesizeof(sendername));
                  
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                  
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  
VrataPD 0;
                  return 
1;

                  }
     }
     }
// *****************************************************************************
    
else if (PlayerToPoint(10.0playerid,302.84912109,-1554.92309570,32.15800095))
    {
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
    {
            if(
COB == 0)
            {
            
// 15.3
            
MoveDynamicObject(KapijaCobra 302.84912109,-1554.92309570,32.15800095,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
COB 1;
            return 
1;
            }
            else
             {
            
MoveDynamicObject(KapijaCobra ,  309.23767090,-1558.12353516,32.15800095,2.00);
            
SendClientMessage(playeridCOLOR_BLUE,"Kapija je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
COB 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid,1144.3000488281,-1292.5,13.39999961853))
    {
    if(
PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
    {
            if(
BolnicaRampaA == 0)
            {
            
DestroyDynamicObject(BolnicaRampa);
            
BolnicaRampa1 =     CreateDynamicObject(9681144.2998046875, -1292.513.399999618530347.999938964840);
            
SendClientMessage(playeridCOLOR_BLUE,"Bolnicarska Rampa je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
BolnicaRampaA 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(BolnicaRampa1);
            
BolnicaRampa =     CreateDynamicObject(9681144.3000488281, -1292.513.3999996185302700.000152587890625);
            
SendClientMessage(playeridCOLOR_BLUE,"Bolnicarska Rampa je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
BolnicaRampaA 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid,1418.59960938,-1652.29980469,13.19999981)) // automehanicar rampa 1
    
{
            if(
RampaMehanicar == 0)
            {
            
DestroyDynamicObject(RampaMehanicar1);
            
RampaMehanicar1o =     CreateDynamicObject(968,1418.59960938,-1652.29980469,13.19999981,0.00000000,0.00000000,90.00000000); // rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicar 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(RampaMehanicar1o);
            
RampaMehanicar1 =     CreateDynamicObject(968,1418.59960938,-1652.29980469,13.19999981,0.00000000,90.00000000,90.00000000); // rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicar 0;
            return 
1;
            }
    }
    else if (
PlayerToPoint(10.0playerid,1366.89941406,-1697.89941406,8.69999981)) // automehanicar rampa 2
    
{
    if(
PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12||PlayerInfo[playerid][pJob] == 7)
    {
            if(
RampaMehanicarr == 0)
            {
            
DestroyDynamicObject(RampaMehanicar2);
            
RampaMehanicar2o =     CreateDynamicObject(968,1366.89941406,-1697.89941406,8.69999981,0.00000000,0.00000000,303.99719238); //rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je otvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i otvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicarr 1;
            return 
1;
            }
            else
            {
            
DestroyDynamicObject(RampaMehanicar2o);
            
RampaMehanicar2 =     CreateDynamicObject(968,1366.89941406,-1697.89941406,8.69999981,0.00000000,90.00000000,303.99719238); //rampa
            
SendClientMessage(playeridCOLOR_BLUE,"Rampa automehanicara je zatvorena .");
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "* %s uzima daljinski i zatvara rampu."sendername);
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            
RampaMehanicarr 0;
            return 
1;
            }
    }
    }
    else if (
PlayerToPoint(10.0playerid1019.48046875, -315.067382812574.313888549805))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pAdmin] == 1340)
    {
                if(
TecKapijaA == 0)
                {
                
MoveDynamicObject(TecKapija2,1015.40,-315.08,74.612.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Garaza La Cosa Nostral je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara garazu."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaA 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(TecKapija2,1019.48, -315.0674.312.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Garaza La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara garazu."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaA 0;
                   return 
1;
                   }
    }
     }
    else if (
PlayerToPoint(10.0playerid1027.7431640625, -366.81445312575.677352905273))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pAdmin] == 1340)
    {
                if(
TecKapijaB == 0)
                {
                
MoveDynamicObject(TecKapija1,1027.74,-366.81,80.172.00); //kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je otvorena i zatvorice se za 7 sekundi.");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaB 1;
                   return 
1;
                   }
                   else
                   {
                    
MoveDynamicObject(TecKapija1,1027.74, -366.8175.672.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
TecKapijaB 0;
                   return 
1;
                   }
    }
    }
    else if (
PlayerToPoint(10.0playerid1284.8892822266, -2056.3867187560.515785217285))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 6)
    {
                if(
LCNgate1 == 0)
                {
                
MoveDynamicObject(LCNGate,1284.888671875, -2056.3867187554.9905853271482.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostral je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
LCNgate1 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(LCNGate,1284.8892822266, -2056.3867187560.5157852172852.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija La Cosa Nostra je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
LCNgate1 0;
                   return 
1;
                   }
    }
     }
    else if (
PlayerToPoint(10.0playerid1590.29980469,-1638.00000000,15.05000019))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == 3)
    {
                if(
PDKapijaA == 0)
                {
                
MoveDynamicObject(PDKapija,1590.30004883,-1638.00000000,9.399999622.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija PD-a je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDKapijaA 1;
                   return 
1;
                   }
                   else
                   {
                
MoveDynamicObject(PDKapija,1590.29980469,-1638.00000000,15.050000192.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija PD-a je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDKapijaA 0;
                   return 
1;
                   }
     }
     }
     else if (
PlayerToPoint(3.0playerid250.50000000,62.40000153,1004.00000000))   //kordinate zatvorene kapije
     
{
     if(
PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
     {
                if (
PDVrataA == 0)
                {
                
MoveDynamicObject(PDVrata1,250.50000000,62.40000153,1006.700012212.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataA 1;
                   return 
1;
                   }
                   else
                   {
                   
MoveDynamicObject(PDVrata1,250.50000000,62.40000153,1004.000000002.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataA 0;
                   return 
1;
                   }

    }
    }
    else if (
PlayerToPoint(3.0playerid247.30000305,72.50000000,1004.00000000))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 3)
    {
                if(
PDVrataB == 0)
                {
                
MoveDynamicObject(PDVrata2,247.30000305,72.50000000,1006.700012212.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataB 1;
                   return 
1;
                   }
                   else
                {
                   
MoveDynamicObject(PDVrata2,247.30000305,72.50000000,1004.000000002.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Vrata PD-a su zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara vrata."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
PDVrataB 0;
                   return 
1;
                   }

    }
    }
    else if (
PlayerToPoint(10.0playerid1812.791015625, -2072.038085937513.32569694519))   //kordinate zatvorene kapije
    
{
    if(
PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
    {
                if(
RuskaKapija == 0)
                {
                
MoveDynamicObject(RuskaKapija1,1812.7734375,-2062.47265625,13.3827667236332.00); // kordinate otvorene kapije
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija Ruske Mafije je otvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i otvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
RuskaKapija 1;
                   return 
1;
                   }
                   else
                   {
                      
MoveDynamicObject(RuskaKapija1,1812.791015625,-2072.0380859375,13.325696945192.00);
                   
SendClientMessage(playeridCOLOR_BLUE,"Kapija Ruske Mafije je zatvorena .");
                 
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string), "* %s uzima daljinski i zatvara kapiju."sendername);
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
RuskaKapija 0;
                   return 
1;
                   }
    }
    }
                if( 
newkeys == KEY_SECONDARY_ATTACK //55589
            
{
            if( 
IsPlayerInRangeOfPointplayerid4.01480.9410,-1771.8586,18.7958 ) )
            {
            
SetPlayerPosplayerid386.2978,173.8582,1008.3828 );
            
SetPlayerInteriorplayerid0);
            
GameTextForPlayerplayerid"Welcome to city hall"3000);
            return 
1;
      }
    }
            if( 
newkeys == KEY_SECONDARY_ATTACK )
            {
            if( 
IsPlayerInRangeOfPointplayerid4.0390.0630,173.5741,1008.3828 ) )
            
SetPlayerPosplayerid1480.9410,-1771.8586,18.7958 );
            
SetPlayerInteriorplayerid0);
            
GameTextForPlayerplayerid"Goodbye"3000);
            return 
1;
          }
        }


  return 
1;

RoX123 is offline   Reply With Quote
Old 11/09/2017, 11:04 PM   #27
RoX123
Big Clucker
 
Join Date: Apr 2017
Posts: 83
Reputation: 1
Default Re: warning 225: unreachable code Problem

Someone?
RoX123 is offline   Reply With Quote
Old 11/09/2017, 11:46 PM   #28
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,083
Reputation: 2655
Default Re: warning 225: unreachable code Problem

Way too much code to even begin to dissect. Any normal function should be at most thirty or so lines. Start splitting things up in smaller functions. There is also a metric fuck ton of code that is unnecessarily repeated. Write something like OpenGate() (or whatever it is supposed to do) instead of copying the same six lines over and over and over.
__________________
Vince is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning 225: unreachable code Man43 Scripting Help 4 18/04/2017 01:31 PM
warning 225: unreachable code Zeddclarity Scripting Help 2 27/07/2015 01:47 PM
warning 225: unreachable code dafuq Scripting Help 4 04/10/2012 01:45 PM
Warning : Unreachable code. Benzke Scripting Help 2 02/09/2012 06:46 AM
warning 225: unreachable code Torran Scripting Help 6 28/01/2012 05:16 AM


All times are GMT. The time now is 02:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.