Problem with car saving and loading.
#4

Do not work.Maybe look in this:
OnGameModeInit

CarSave();

public CarSave()
{
new files [128];
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format( files, 60, "saves/cars/%s.ini",name);
if(!fexist(files))
{
return 1;
}
print("Cars suceful loading");
PlayerData[ playerid ][ CarType ] = dini_Int( files, "CarType");
PlayerData[ playerid ][ pX ] = dini_Float( files, "PosX");
PlayerData[ playerid ][ pY ] = dini_Float( files, "PosY");
PlayerData[ playerid ][ pZ ] = dini_Float( files, "PosZ");
PlayerData[ playerid ][ pA ] = dini_Float( files, "PosA");
VehicleInfo[ playerid ][ Color1 ] = dini_Int( files, "Color1");
VehicleInfo[ playerid ][ Color2 ] = dini_Int( files, "Color2");
new carid = CreateVehicle(PlayerData[ playerid ][ CarType ], PlayerData[ playerid ][ pX ], PlayerData[ playerid ][ pY ], PlayerData[ playerid ][ pZ ],PlayerData[ playerid ][ pA ], VehicleInfo[ playerid ][Color1], VehicleInfo[ playerid ][Color2], -1);
PlayerData[playerid][pcar]=carid;
vehicleDB[carid][lock]=true;
new string[128];
format(string,128,"Model:%d,X:%f,Y:%f,Z:%f,A:%f",P layerData[ playerid ][ CarType ], PlayerData[ playerid ][ pX ], PlayerData[ playerid ][ pY ], PlayerData[ playerid ][ pZ ], PlayerData[ playerid ][ pA ]);
print(string);




And why i don't get this message:

new string[128];
format(string,128,"Model:%d,X:%f,Y:%f,Z:%f,A:%f",P layerData[ playerid ][ CModelis ], PlayerData[ playerid ][ pX ], PlayerData[ playerid ][ pY ], PlayerData[ playerid ][ pZ ], PlayerData[ playerid ][ pA ]);
print(string);
Reply


Messages In This Thread
Problem with car saving and loading. - by budelis - 27.06.2011, 21:15
Re: Problem with car saving and loading. - by budelis - 28.06.2011, 06:35
Re: Problem with car saving and loading. - by [HiC]TheKiller - 28.06.2011, 06:41
Re: Problem with car saving and loading. - by budelis - 28.06.2011, 08:08
Re: Problem with car saving and loading. - by budelis - 28.06.2011, 12:12
Re: Problem with car saving and loading. - by budelis - 28.06.2011, 15:07
Re: Problem with car saving and loading. - by budelis - 28.06.2011, 16:23

Forum Jump:


Users browsing this thread: 1 Guest(s)