save car problem +REP
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
stock SaveAllCars()
{
    new
        File:F,
        str[128],
        Float:P[4],
        Model;

    F = fopen("cars.cfg", io_write);
    for(new d = 1; d < MAX_VEHICLES; d++)
    {
        if((Model = GetVehicleModel(d)))
        {
            GetVehiclePos(d,P[0],P[1],P[2]);
            GetVehicleZAngle(d,P[3]);
            format(str,128,"%d,%.4f,%.4f,%.4f,%.4f\r\n",Model,P[0],P[1],P[2],P[3]);
            fwrite(F,str);
        }
    }
    fclose(F);
    return print("All Vehicles saved !");
}
In OnGameModeExit
very thanks ! it work ! the REP i your
but i have another question

if when the car have DestroyVehicle
it will be write in to the cars.cfg?
Reply


Messages In This Thread
save car problem +REP - by peterory - 08.06.2012, 17:58
Re: save car problem +REP - by Jefff - 08.06.2012, 18:34
Re: save car problem +REP - by peterory - 09.06.2012, 02:26
Re: save car problem +REP - by JaKe Elite - 09.06.2012, 02:29
Re: save car problem +REP - by peterory - 09.06.2012, 04:54

Forum Jump:


Users browsing this thread: 2 Guest(s)