Vehicle lock system problem
#8

Thank you but, now it seems that it returns every car as default...

pawn Код:
new panels,doors,lights,tires;
    GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
   
//==============================================================================
//Car stealing system
//==============================================================================
   
    if(IsPlayerLookingAtVehicle(playerid,vehicleid))
    {
            if(gTeam[playerid] == TEAM_BANDIT)
            {
                if(unlocked[vehicleid] == 1)
                {
                    GameTextForPlayer(playerid,"~y~This vehicle is already unlocked!",4000,3);
                    return 1;
                }

                    if(unlocked[vehicleid] == 0)
                    {
   
                        switch(vehicleid)
                        {
                       
                        //////////
                        //Nebula//
                        //////////
                       
                        case 516:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 10)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 10)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }
                       
                        //////////////
                        //Washington//
                        //////////////
                       
                        case 421:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 30)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 30)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }
                       
                        ///////////
                        //Stretch//
                        ///////////
                       
                        case 409:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 60)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 60)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }
                       
                        //======================================================
                        //Cops
                        //======================================================

                        ////////
                        //Lspd//
                        ////////

                        case 596:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 75)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this good secured door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 75)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }
                       
                        ////////
                        //Lspd//
                        ////////

                        case 599:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 75)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this good secured door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 75)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }


                        ///////////
                        //S.W.A.T//
                        ///////////

                        case 601:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 90)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this heavy secured door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 90)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }

                        ///////
                        //FBI//
                        ///////

                        case 490:
                        {
                            if(doors <100)
                            {
                                new crand = random(100);
                                if(crand <= 95)
                                {
                                    GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this heavy secured door, try another car...",4000,3);
                                    funlocked[vehicleid] = 1;
                                    SetTimer("lockshotrectim", 30000, false);
                                    unlocked[vehicleid] = 0;
                                }
                                else if(crand > 95)
                                {
                                        unlocked[vehicleid] = 1;
                                        GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
                                }
                            }
                        }
                       
                        default:
                        {
                            SendClientMessage(playerid, COLOR_RED, "This car is not stealable!");
                        }
                    }
                }
            }
        }
I tried with all the vehicle ID's but when I attempt to shoot it keeps saying, this car is not stealable
Reply


Messages In This Thread
Vehicle lock system problem - by knackworst - 04.09.2011, 00:01
Re: Vehicle lock system problem - by =WoR=Varth - 04.09.2011, 11:22
Re: Vehicle lock system problem - by knackworst - 04.09.2011, 20:59
Re: Vehicle lock system problem - by =WoR=Varth - 05.09.2011, 05:23
Re: Vehicle lock system problem - by knackworst - 05.09.2011, 15:04
AW: Vehicle lock system problem - by Joshua_Turnerz - 05.09.2011, 15:15
Re: Vehicle lock system problem - by =WoR=Varth - 05.09.2011, 15:16
Re: Vehicle lock system problem - by knackworst - 09.09.2011, 16:02
Re: Vehicle lock system problem - by =WoR=Varth - 09.09.2011, 16:17
Re: Vehicle lock system problem - by spd_sahil - 09.09.2011, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)