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


Messages In This Thread
Not change the Plate - by dadge9 - 12.10.2013, 15:46
Re: Not change the Plate - by tyler12 - 12.10.2013, 15:48
Re: Not change the Plate - by dadge9 - 12.10.2013, 16:05

Forum Jump:


Users browsing this thread: 1 Guest(s)