What's wrong here?
#4

pawn Код:
stock AddBuyableVehicle(FileName[],Cost,Float:vx,Float:vy,Float:vz,CarModel)
{
    if(!dini_Exists("Owners.ini"))
    {
        dini_Create("Owners.ini");
    }
    CarCount ++;
    new ID = CarCount;
    CarInfo[ID][CarPrice] = Cost;
    CarInfo[ID][vX] = vx;
    CarInfo[ID][vY] = vy;
    CarInfo[ID][vZ] = vz;
    CarInfo[ID][Model] = CarModel;
    format(CarInfo[ID][CarOwner], 24, "CarOwnerName");
    if(strlen(dini_Get("Owners.ini", FileName)))
    {
    format(CarInfo[ID][CarOwner], 24, "%s", dini_Get("Owners.ini", FileName));
    CarInfo[ID][Owned] = 1;
    }
    CarInfo[ID][ForSell] = 1;
    CreateVehicle(CarInfo[ID][Model],CarInfo[ID][vX],CarInfo[ID][vY],CarInfo[ID][vZ],0,0,0,0);
}
That should create the vehicle for you.
Reply


Messages In This Thread
What's wrong here? - by Cjgogo - 21.07.2011, 14:56
Re: What's wrong here? - by JaTochNietDan - 21.07.2011, 14:59
Re: What's wrong here? - by Shockey HD - 21.07.2011, 15:01
Re: What's wrong here? - by CJ101 - 21.07.2011, 15:11
Re: What's wrong here? - by Cjgogo - 22.07.2011, 08:53
Re: What's wrong here? - by TouR - 22.07.2011, 08:58
Re: What's wrong here? - by Cjgogo - 22.07.2011, 12:45
Re: What's wrong here? - by MadeMan - 22.07.2011, 15:43
Re: What's wrong here? - by crossx7 - 22.07.2011, 15:49
Re: What's wrong here? - by TouR - 22.07.2011, 15:59

Forum Jump:


Users browsing this thread: 3 Guest(s)