Problem CreateVehicle
#1

I have code like this.

Код:
enum vInfo
{
	vOwner[24],
	vModel,
	vId,
	Float:vPosX,
        Float:vPosY,
        Float:vPosZ,
        Float:vPosA,
}
new VehicleInfo		[MAX_PLAYERS][vInfo];
new OwnedVehicle       [MAX_VEHICLES];
Код:
stock LoadVehicleData(playerid)
{
    new savingstring[20];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(query, sizeof(query), "SELECT * FROM `vehicles` WHERE `owner` = '%s'", pName);
    mysql_query(query);
    mysql_store_result();
    while(mysql_fetch_row_format(query,"|"))
    {
		mysql_fetch_field_row(VehicleInfo[playerid][vOwner], "owner");
		mysql_fetch_field_row(savingstring, "vid"); VehicleInfo[playerid][vId] = strval(savingstring);
		mysql_fetch_field_row(savingstring, "model"); VehicleInfo[playerid][vModel] = strval(savingstring);
		mysql_fetch_field_row(savingstring, "posx"); VehicleInfo[playerid][vPosX] = strval(savingstring);
		mysql_fetch_field_row(savingstring, "posy"); VehicleInfo[playerid][vPosY] = strval(savingstring);
		mysql_fetch_field_row(savingstring, "posz"); VehicleInfo[playerid][vPosZ] = strval(savingstring);
		mysql_fetch_field_row(savingstring, "posa"); VehicleInfo[playerid][vPosA] = strval(savingstring);
	}
	mysql_free_result();
	OwnedVehicle[playerid] = CreateVehicle(VehicleInfo[playerid][vModel],VehicleInfo[playerid][vPosX],VehicleInfo[playerid][vPosY],VehicleInfo[playerid][vPosZ],VehicleInfo[playerid][vPosA],-1,-1,300);
	return 1;
}
and i have 3 rows in my database, but only one of last entry that can CreateVehicle.
Any one can help me?
Please ...
Reply
#2

outdated MySQL plugin / include, update to latest MySQL plugin, and I will help you.
Reply
#3

Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
outdated MySQL plugin / include, update to latest MySQL plugin, and I will help you.
before, I've tried to update mysql plugin to R39, but my mysql_log are very large by itself. So i downgrade again to R5
Reply
#4

You know you can delete that log, right?
And you can make it so it only shows the errors...
Reply
#5

Quote:
Originally Posted by Jamester
Посмотреть сообщение
You know you can delete that log, right?
And you can make it so it only shows the errors...
OK, i will try ..
Wait ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)