Car ID problems
#1

Hy everyone, i got a problem with my cars, First car ID was 1, at /v buy and factions . I try to put the first car ID, 170, but at first server restart, the car ID was 1 and at ''Owner'' say nothing. Then i try to put again the id 1 as the first car id and when i use /v buy command the first car that was in my gamemode disappear. I buy more cars at Dealership, more cars disappear from my gamemode. i try to put again the first id 750 but then disappear the cars from dealership, and of course at server restart appear with id 1 and at ''Owner'' say nothing. Again i try to put the first id as 786 [my last car in my gm] but disappear the car id 785. Down you have some screenshoots, if you don't understand what i write here, [sorry for my bad english, but i'm from Romania]

1. /imageshack/img707/7432/samp049ot.png
2. /imageshack/img825/60/samp050eb.png
3. /imageshack/img819/7365/samp051ua.png
4. /imageshack/img600/2300/samp052qh.png
5. /imageshack/img594/1046/samp054li.png

Here you have what i modified: [with car id as 170]
pawn Код:
public IsAnOwnableCar(carid)
{
    for(new i = 170; i < sizeof(ownedcar); i++)
    {
        if(carid == ownedcar[i]) return 1;
    }
    return 0;
}

pawn Код:
public LoadCar()
{
    new file[26];
    for(new idx = 170; idx < sizeof(CarInfo) ; idx++)
    {
        format(file, sizeof(file),"LARP/Vehicles/%d.ini", idx)
        if(dini_Exists(file))
pawn Код:
LoadCar();
    new string2[64];
    for(new h = 170; h < sizeof(CarInfo); h++)
    {
        format(string2, sizeof(string2), "LARP/Vehicles/%d.ini",h);
        if(dini_Exists(string2))
        {
            ownedcar[h] = AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
            if(CarInfo[h][cPaintjob] != 999)
            {
                ChangeVehiclePaintjob(h, CarInfo[h][cPaintjob]);
            }
            SetVehicleVirtualWorld(h, CarInfo[h][cVirWorld]);
            SetVehicleModifications(h);
        }
    }

pawn Код:
else if(strcmp(x_nr,"buy",true) == 0)
            {
                new car = 170;
                new model = GetVehicleModel(idcar);
                if(IsASalesVehicle(idcar))
                {
                    if(PlayerInfo[playerid][pLevel] < 4)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "You need to be level 4 to buy a vehicle!");
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPcarkey] == 9999 || PlayerInfo[playerid][pPcarkey2] == 9999 || PlayerInfo[playerid][pPcarkey3] == 9999) { }
                    else return SendClientMessage(playerid, COLOR_GREY,"* You already own 3 cars!");
                    if(GetPlayerMoney(playerid) >= GetVehiclePrice(idcar))
                    {
                        if(PlayerInfo[playerid][pCarLic] == 1)
                        {
                            for(new h = 170; h < sizeof(CarInfo); h++)
                            {
                                if(CarInfo[h][cOwned] == 0)
                                {
                                    car = h;
                                    h = 9999;
                                }
                            }
If you don't understand anything please tell me, if i modified something wrong or i don't modified something, and please help..i have a lot of work with this gamemode..but i can't start until i finish this..
this gm is Raven's RP and i modified at this from ianuary ..so..i can't leave it

Again: Sorry for my bad english -_-''
And if i can give some rep++ i give but tell me how..
If someone is from Roumania and don't understand, i translate in romanian
Reply


Messages In This Thread
Car ID problems - by MMickey - 08.08.2012, 07:07
Re: Car ID problems - by Cjgogo - 08.08.2012, 07:14
Re: Car ID problems - by MMickey - 08.08.2012, 09:17
Re: Car ID problems - by MMickey - 09.08.2012, 03:20
Re: Car ID problems - by MMickey - 10.08.2012, 03:13
Re: Car ID problems - by MMickey - 17.08.2012, 10:43

Forum Jump:


Users browsing this thread: 3 Guest(s)