[HELP] custom police car
#10

i solved some problem

until now always attach new police light...now i solved

bot now i don't know why didn't destroy the police light

here is the code

pawn Код:
if (newkeys == KEY_CROUCH)
    {
      if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
      {
        new pdlight1;
        new pdlight2;
        new pdlight3;
        new pdlight4;
        new checkcar = GetPlayerVehicleID(playerid);
        if(pdlighton1 == 0 && checkcar == buffpd1 || pdlighton2 == 0 && checkcar == buffpd2 || pdlighton3 == 0 && checkcar == buffpd3 || pdlighton4 == 0 && checkcar == buffpd4)
        {
            if(checkcar == buffpd1)
            {
                pdlight1 = CreateObject(18646,0,0,0,0,0,0);
                AttachObjectToVehicle(pdlight1, buffpd1, 0, -0.0, 0, 2.0, 2.0, 3.0);
                pdlighton1 = 1;
            }
            if(checkcar == buffpd2)
            {
                pdlight2 = CreateObject(18646,0,0,0,0,0,0);
                AttachObjectToVehicle(pdlight2, buffpd2, 0, -0.0, 0, 2.0, 2.0, 3.0);
                pdlighton2 = 1;
            }
            if(checkcar == buffpd3)
            {
                pdlight3 = CreateObject(18646,0,0,0,0,0,0);
                AttachObjectToVehicle(pdlight3, buffpd3, 0, -0.0, 0, 2.0, 2.0, 3.0);
                pdlighton3 = 1;
            }
            if(checkcar == buffpd4)
            {
                pdlight4 = CreateObject(18646,0,0,0,0,0,0);
                AttachObjectToVehicle(pdlight4, buffpd4, 0, -0.0, 0, 2.0, 2.0, 3.0);
                pdlighton4 = 1;
            }
        }
        else
        {
            if(checkcar == buffpd1)
            {
                DestroyObject(pdlight1);
            }
            if(checkcar == buffpd2)
            {
                DestroyObject(pdlight2);
            }
            if(checkcar == buffpd3)
            {
                DestroyObject(pdlight3);
            }
            if(checkcar == buffpd4)
            {
                DestroyObject(pdlight4);
            }
        }
      }
    }
Reply


Messages In This Thread
[HELP] custom police car - by dk4ever - 10.03.2011, 20:07
Re: [HELP] custom police car - by xRyder - 10.03.2011, 20:10
Re: [HELP] custom police car - by dk4ever - 10.03.2011, 20:12
Re: [HELP] custom police car - by xRyder - 10.03.2011, 20:18
Re: [HELP] custom police car - by dk4ever - 10.03.2011, 20:20
Re: [HELP] custom police car - by dk4ever - 10.03.2011, 21:18
Re: [HELP] custom police car - by Loppa - 10.03.2011, 21:24
Re: [HELP] custom police car - by dk4ever - 10.03.2011, 21:33
Re: [HELP] custom police car - by dk4ever - 11.03.2011, 08:29
Re: [HELP] custom police car - by dk4ever - 11.03.2011, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)