Command not updating to MySQL
#1

This is my command;
pawn Код:
CMD:saveveh(playerid, params[])
{
    if(playerVariables[playerid][pGamemaster] >= 3)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You have to be in a vehicle to use this command");
        {
            new szQuery[300], Float:vehx, Float:vehy, Float:vehz, currentveh, currentmodel;
            currentveh = GetPlayerVehicleID(playerid);
            currentmodel = GetVehicleModel(currentmodel);
            GetVehiclePos(currentveh, vehx, vehy, vehz);
            format(szQuery, sizeof(szQuery), "UPDATE vehicles INSERT vModel = '%d' AND PosX = '%d' AND PosY = '%d' AND PosZ = '%d' AND Color1 = '%d' AND Color2 = '%d' WHERE ID = '%d'", serverVehicle[currentmodel][vModel], serverVehicle[currentveh][PosZ], serverVehicle[currentveh][PosY], serverVehicle[currentveh][PosZ], serverVehicle[currentveh][Color1], serverVehicle[currentveh][Color2], serverVehicle[currentveh][vID]);
            mysql_query(szQuery);
            SendClientMessage(playerid, COLOR_YELLOW, "|- Vehicle Saved and updated to MySQL! -|");
        }// We don't have the rotation ¬_¬ <- remove rot :D You removed it? nah
    }
    return 1;
}
For some reason it's not updating MySQL.
This is under GameModeInit also;
pawn Код:
new szQuery[300];
    format(szQuery, sizeof(szQuery), "SELECT * FROM vehicles WHERE vID = '%d'", serverVehicle[veh][vID]);
    mysql_query(szQuery);
If you need, here is my serverVehicle enum;
Код:
enum veh
{
	vID,
	vModel,
	PosX,
	PosY,
	PosZ,
	PosR,
	Color1,
	Color2
}
new	serverVehicle[MAX_VEHICLES][veh];
Reply


Messages In This Thread
Command not updating to MySQL - by Elysian` - 09.07.2012, 20:22
Re: Command not updating to MySQL - by Dodo9655 - 09.07.2012, 21:21
Re: Command not updating to MySQL - by Elysian` - 16.07.2012, 10:45
Re: Command not updating to MySQL - by Elysian` - 16.07.2012, 13:55
Re: Command not updating to MySQL - by Dan. - 16.07.2012, 14:24
Re: Command not updating to MySQL - by Elysian` - 16.07.2012, 15:29
Re: Command not updating to MySQL - by Dan. - 16.07.2012, 17:46
Re: Command not updating to MySQL - by Elysian` - 18.07.2012, 16:55
Re: Command not updating to MySQL - by Dan. - 18.07.2012, 16:58
Re: Command not updating to MySQL - by Elysian` - 18.07.2012, 17:05

Forum Jump:


Users browsing this thread: 1 Guest(s)