NEED URGENT HELP!
#6

where you i add the code?

pawn Код:
public OnVehicleSpawn(vehicleid) {
    VehicleStatus{vehicleid} = 0;
    TruckContents[vehicleid] = 0;
    VehicleRadioStation[vehicleid] = 0;

    for(new i = 0; i < sizeof(FamilyInfo); i++) {
        for(new d = 0 ; d < MAX_GANG_VEHICLES; d++) {
            if(FamilyVehicleInfo[i][d][fvLocked] != 0 && FamilyVehicleInfo[i][d][fvLock] > 0)
                LockGangVehicle(i, FamilyVehicleInfo[i][d][fvId], FamilyVehicleInfo[i][d][fvLock]);
        }
    }

    switch(GetVehicleModel(vehicleid)) {
        case 427, 428, 432, 601, 528: SetTimerEx("DelayedVehHealth", 1000, false, "d", vehicleid);
    }

    new v;
    foreach(Player, i)
    {
        v = GetPlayerVehicle(i, vehicleid);
        if(v != -1)
        {
            if(PlayerVehicleInfo[i][v][pvId] == vehicleid && GetVehicleModel(vehicleid) != PlayerVehicleInfo[i][v][pvModelId])
            {
                DestroyVehicle(vehicleid);
                VehicleRadioStation[vehicleid] = 0;
                PlayerVehicleInfo[i][v][pvId] = CreateVehicle(PlayerVehicleInfo[i][v][pvModelId], PlayerVehicleInfo[i][v][pvPosX], PlayerVehicleInfo[i][v][pvPosY], PlayerVehicleInfo[i][v][pvPosZ], PlayerVehicleInfo[i][v][pvPosAngle],PlayerVehicleInfo[i][v][pvColor1], PlayerVehicleInfo[i][v][pvColor2], -1);
                if(PlayerVehicleInfo[i][v][pvLocked] == 1) LockPlayerVehicle(i, PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvLock]);
                ChangeVehiclePaintjob(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvPaintJob]);
                ChangeVehicleColor(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvColor1], PlayerVehicleInfo[i][v][pvColor2]);
                for(new m = 0; m < MAX_MODS; m++)
                {
                    if(PlayerVehicleInfo[i][v][pvMods][m] >= 1000 && PlayerVehicleInfo[i][v][pvMods][m] <= 1193)
                    {
                        if(InvalidModCheck(GetVehicleModel(vehicleid), PlayerVehicleInfo[i][v][pvMods][m]))
                        {
                            AddVehicleComponent(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvMods][m]);
                        }
                        else
                        {
                            //printf("Removing invalid mod %d from %d of %s", PlayerVehicleInfo[i][v][pvMods][m], GetVehicleModel(vehicleid), GetPlayerNameEx(i));
                            PlayerVehicleInfo[i][v][pvMods][m] = 0;
                        }
                    }
                }
            }
            else
            {
                ChangeVehiclePaintjob(vehicleid, PlayerVehicleInfo[i][v][pvPaintJob]);
                ChangeVehicleColor(vehicleid, PlayerVehicleInfo[i][v][pvColor1], PlayerVehicleInfo[i][v][pvColor2]);
                for(new m = 0; m < MAX_MODS; m++)
                {
                    if(PlayerVehicleInfo[i][v][pvMods][m] >= 1000 && PlayerVehicleInfo[i][v][pvMods][m] <= 1193)
                    {
                        if(InvalidModCheck(GetVehicleModel(vehicleid), PlayerVehicleInfo[i][v][pvMods][m]))
                        {
                            AddVehicleComponent(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvMods][m]);
                        }
                        else
                        {
                            //printf("Removing invalid mod %d from %d of %s", PlayerVehicleInfo[i][v][pvMods][m], GetVehicleModel(vehicleid), GetPlayerNameEx(i));
                            PlayerVehicleInfo[i][v][pvMods][m] = 0;
                        }
                    }
                }
                if(PlayerVehicleInfo[i][v][pvLocked] == 1) LockPlayerVehicle(i, PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvLock]);
            }
            new string[128];
            format(string,sizeof(string),"Your %s has been sent to the location at which you last parked it.",GetVehicleName(vehicleid));
            SendClientMessage(i, COLOR_GRAD1, string);
        }
    }

    if(LockStatus[vehicleid])
    {
        foreach(Player, i)
        {
            if(PlayerInfo[i][pLockCar] == vehicleid)
            {
                PlayerInfo[i][pLockCar] = INVALID_VEHICLE_ID;
            }
        }
    }

    if(VehicleBomb{vehicleid} == 1)
    {
        foreach(Player, i)
        {
            if(PlayerInfo[i][pFaction] == 4 || PlayerInfo[i][pLeader] == 4)
            {
                if(PlacedVehicleBomb[i] == vehicleid)
                {
                    VehicleBomb{vehicleid} = 0;
                    PlacedVehicleBomb[i] = INVALID_VEHICLE_ID;
                    PickUpC4(i);
                    PlayerInfo[i][pC4Used] = 0;
                    PlayerInfo[i][pC4Get] = 1;
                }
            }
        }
    }
    return 1;
}
and can you also please give me the code so if someone enters any car it will tell them if the engine is running or not?
Reply


Messages In This Thread
NEED URGENT HELP! - by NinjaChicken - 10.11.2012, 05:10
Re: NEED URGENT HELP! - by [HK]Ryder[AN] - 10.11.2012, 05:13
Re: NEED URGENT HELP! - by clarencecuzz - 10.11.2012, 05:16
Re: NEED URGENT HELP! - by NinjaChicken - 10.11.2012, 05:25
Re: NEED URGENT HELP! - by clarencecuzz - 10.11.2012, 05:32
Re: NEED URGENT HELP! - by NinjaChicken - 10.11.2012, 05:43

Forum Jump:


Users browsing this thread: 1 Guest(s)