Park Car System
#7

Quote:
Originally Posted by CAR
Посмотреть сообщение
If you've got dini.inc, use this:

Top:
pawn Код:
new CarFile[50], Float:posx, Float:posy, Float:posz;
OnPlayerExitVehicle:
pawn Код:
format(CarFile, sizeof(CarFile), "vehicle%d.txt", vehicleid);
if(!dini_Exists(CarFile)) dini_Create(CarFile);
GetVehiclePos(vehicleid, posx, posy, posz);
GetVehicleZAngle(vehicleid, posa);
dini_FloatSet(CarFile, "x", posx);
dini_FloatSet(CarFile, "y", posy);
dini_FloatSet(CarFile, "z", posz);
dini_FloatSet(CarFile, "a", posa);
OnVehicleSpawn:
pawn Код:
format(CarFile, sizeof(CarFile), "vehicle%d.txt", vehicleid);
if(!dini_Exists(CarFile)) { dini_Create(CarFile);
} else {
   posx = dini_Float(CarFile, "x");
   posy = dini_Float(CarFile, "y");
   posz = dini_Float(CarFile, "z");
   posa = dini_Float(CarFile, "a");
   SetVehiclePos(vehicleid, posx, posy, posz);
   SetVehicleZAngle(vehicleid, posa);
}
I hope it works (it creates a file for any vehicle!)
@ CAR , OnPlayerExitVehicle: etc etc, where i put that code? I am new in pawno.


Thanks !
Reply


Messages In This Thread
Park Car System - by GaB1TzZzu - 10.09.2010, 15:18
Re: Park Car System - by LarzI - 10.09.2010, 16:15
Re: Park Car System - by GaB1TzZzu - 10.09.2010, 16:33
Re: Park Car System - by LarzI - 10.09.2010, 16:37
Re: Park Car System - by GaB1TzZzu - 10.09.2010, 16:39
Re: Park Car System - by CAR - 10.09.2010, 16:50
Re: Park Car System - by GaB1TzZzu - 10.09.2010, 17:32
Re: Park Car System - by GaB1TzZzu - 11.09.2010, 05:56
Re: Park Car System - by thomas.. - 11.09.2010, 10:33
Re: Park Car System - by GaB1TzZzu - 11.09.2010, 10:37

Forum Jump:


Users browsing this thread: 2 Guest(s)