Not change the Plate
#1

Код:
stock LoadCar()
{
	new Query[128];
	new vid;
	new string[62];
	format(Query, sizeof(Query), "SELECT `Id`, `Owner`,  `Ownername`,  `Model`, `PosX`, `PosY`, `PosZ` `PosFace`, `Color1`, `Color2`, `Plate` FROM `vehicle`");
	mysql_query(Query);
	mysql_store_result();
	while(mysql_fetch_row(Query, "|"))
	{
		vid = LoadedInfo[Vehicles];
		sscanf(Query, "p<|>dds[25]dffffdds[32]",VehicleInfo[vid][Id],VehicleInfo[vid][Owner],VehicleInfo[vid][Ownername],VehicleInfo[vid][Model], VehicleInfo[vid][PosX], VehicleInfo[vid][PosY], VehicleInfo[vid][PosZ], VehicleInfo[vid][PosFace], VehicleInfo[vid][Color1], VehicleInfo[vid][Color2], VehicleInfo[vid][Plate]);
		new vehd = CreateVehicle(VehicleInfo[vid][Model], VehicleInfo[vid][PosX], VehicleInfo[vid][PosY], VehicleInfo[vid][PosZ], VehicleInfo[vid][PosFace], VehicleInfo[vid][Color1], VehicleInfo[vid][Color2],-1);
		SetVehicleNumberPlate(vehd, VehicleInfo[vid][Plate]);
		LoadedInfo[Vehicles] = LoadedInfo[Vehicles] + 1;
	}
	format(string, sizeof(string), "%d kocsi betцltve!", LoadedInfo[Vehicles]);
	print(string);
}
I was trying format string but didn't work it and When Load the server The plate is simple "XYZSR998" and not what is in the database
Sorry for my bad english
Reply
#2

SetVehicleToRespawn(id); after setting the plate.
Reply
#3

Its not workin, Not may be problem in the database Plate type is "text"?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)