How to save and load from file
#1

I know, I must search first, but I've a problem with searching:
[img width=1024 height=599]/imageshack/img21/5819/sampnotallowed.jpg[/img]

I want to do in-game /addcar and then comes AddStaticVehicle in a file. (Cars.txt)

I know something to put

pawn Код:
new Float:GetX, Float:GetY, Float:GetZ, Float:GetA, string[256], auto;
GetPlayerPos(playerid, Float:GetX, Float:GetY, Float:GetZ);
GetPlayerFacingAngle(playerid, Float:GetA);
auto = GetVehicleModel(GetVehicleID(playerid));
format(string, sizeof(string), "AddStaticVehicle(%d, %f, %f, %f, %f, 0, 0);", auto, Float:GetX, Float:GetY, Float:GetZ, Float:GetA);
With dini I can't use I think because then you must have a name for it: Car=AddStaticVehicle(...);
And when you want the next car, then the first car is deleted...
I don't want that.

How can I save lines like AddStaticVehicle in a file and load it in OnGameModeInit()
Please help me
Reply


Messages In This Thread
How to save and load from file - by CAR - 21.10.2009, 10:19
Re: How to save and load from file - by pagie1111 - 21.10.2009, 10:24
Re: How to save and load from file - by CAR - 21.10.2009, 10:28
Re: How to save and load from file - by saiberfun - 21.10.2009, 11:23
Re: How to save and load from file - by CAR - 21.10.2009, 12:42
Re: How to save and load from file - by saiberfun - 21.10.2009, 12:45
Re: How to save and load from file - by CAR - 21.10.2009, 12:58
Re: How to save and load from file - by CAR - 21.10.2009, 13:16
Re: How to save and load from file - by CAR - 21.10.2009, 13:29
Re: How to save and load from file - by dice7 - 21.10.2009, 13:35

Forum Jump:


Users browsing this thread: 4 Guest(s)