MySQL Vehicle System Saving Bug
#1

Hi!

I need 1 working Vehicle System Saving,because my script is bad.

Here's my vehicle saving system,nothing save into mysql table. :/

Код:
enum carInfo
{
	vID,
	vModel,
	Float:vPosX,
	Float:vPosY,
	Float:vPosZ,
	Float:vRot,
	vCol1,
	vCol2
};
new cInfo[MAX_VEHICLES][carInfo];
Код:
CMD:vehicles(playerid, params[])
{
	VehicleSaveAll();
	return 1;
}

stock VehicleSaveAll()
{
	new query[1024],str[128];

	for(new i=0; i<sizeof(cInfo); i++)
	{
		
		GetVehiclePos(cInfo[i][vID],cInfo[i][vPosX],cInfo[i][vPosY],cInfo[i][vPosZ]);
		GetVehicleZAngle(cInfo[i][vID], cInfo[i][vRot]);
		
		format(query,sizeof(query),"UPDATE sveh SET VehX='%f',VehY='%f',VehZ='%f',VehRot='%f' WHERE ID='%d'",cInfo[i][vPosX],cInfo[i][vPosY],cInfo[i][vPosZ],cInfo[i][vRot],cInfo[i][vID]);
		mysql_function_query(dbhandle,query,true,"","");
		
		printf("Cars Saved: %d", i); 
		
		
    }
	return 1;
}
Sorry for my bad english,iam slovakian.

What is the wrong ? Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)