[INI]Need Car Save and Load Code
#1

Heey all,

Can someone please give me a Car Save and Load Code ?
So when you enter a command like /parkcar the position of vehicle will be saved and when server restart the vehicle will be there.
I tried housecar from GarHouse but dont work.
Its saves good but it dont load.

Thanks Admigo
Reply
#2

http://forum.sa-mp.com/forumdisplay.php?f=70

Look at some tutorials, how to make saving systems, how to make car & house system, you will learn how to make it. But well, what file saving system are you using currently?
Reply
#3

maybe this
https://sampforum.blast.hk/showthread.php?tid=166714
Reply
#4

Why my vehicles dont load?
It saved good but dont load.
Код:
//load user data
INI_Int("Vehicle Model ID",PlayerInfo[playerid][vModelID]);	
INI_Float("Vehicle PosX",PlayerInfo[playerid][vPosX]);	
INI_Float("Vehicle PosY",PlayerInfo[playerid][vPosY]);	
INI_Float("Vehicle PosZ",PlayerInfo[playerid][vPosZ]);	
INI_Float("Vehicle PosA",PlayerInfo[playerid][vPosA]);

//park command
if (strcmp("/park", cmdtext, true, 10) == 0)
	{
		new INI:File = INI_Open(UserPath(playerid));
		INI_SetTag(File,"data");
		new iVehicleID = GetPlayerVehicleID(playerid);
		new Float:x, Float:y, Float:z, Float:a;
		GetVehiclePos(iVehicleID, x, y, z);
		GetVehicleZAngle(iVehicleID, a);
		INI_WriteInt(File,"Vehicle Model ID",PlayerInfo[playerid][vModelID]=GetVehicleModel(iVehicleID));
		INI_WriteFloat(File,"Vehicle PosX",PlayerInfo[playerid][vPosX]=x);
		INI_WriteFloat(File,"Vehicle PosY",PlayerInfo[playerid][vPosY]=y);
		INI_WriteFloat(File,"Vehicle PosZ",PlayerInfo[playerid][vPosZ]=z);
		INI_WriteFloat(File,"Vehicle PosA",PlayerInfo[playerid][vPosA]=a);
		SendClientMessage(playerid,COLOR_LIGHTBLUE,"Vehicle Pos Saved!");
		INI_Close(File);
		return 1;
	}

//when login
AddStaticVehicleEx(PlayerInfo[playerid][vModelID],PlayerInfo[playerid][vPosX],PlayerInfo[playerid][vPosY],PlayerInfo[playerid][vPosZ],PlayerInfo[playerid][vPosA],0,0,9999999);
How to fix this?
Reply
#5

your using Dini i guess you can use better things than dini
Reply
#6

Quote:
Originally Posted by Nirzor
Посмотреть сообщение
your using Dini i guess you can use better things than dini
I am using Y_Ini.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)