05.06.2014, 17:19
This was in my mysql_log.txt:
The "query" is set to 1000(global var).
pawn Код:
[18:38:01 | Edited 18:38:09] Jamie.: [18:35:15] [DEBUG] mysql_query - connection: 1, query: "INSERT INTO `server_vehicles` (rModel, rColour1, rColour2, isRen", use_cache: true
pawn Код:
CMD:createveh(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
new Float:x, Float:y, Float:z, Float:a, job, faction, rental, model, colour1, colour2;
new rentalid = RentalGetFreeSlot();
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
if(sscanf(params, "dddddd", model, colour1, colour2, rental, faction, job)) return SendClientMessage(playerid, COLOR_RED, "Error:"COL_WHITE" //createveh [model] [colour1] [colour2] [Rental] [Faction] [Job]");
format(query, sizeof(query), "INSERT INTO `server_vehicles` (rModel, rColour1, rColour2, isRental, isFaction, isJob, rPosX, rPosY, rPosZ, rPosA) VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%f', '%f', '%f', '%f')", model, colour1, colour2, rental, faction, job, x, y, z, a);
mysql_query(sqldb, query);
RentalInfo[rentalid][rID] = CreateVehicle(RentalInfo[rentalid][rModel], RentalInfo[rentalid][rPosX], RentalInfo[rentalid][rPosY], RentalInfo[rentalid][rPosZ], RentalInfo[rentalid][rPosA], RentalInfo[rentalid][rColour1], RentalInfo[rentalid][rColour2], -1);
rCreated[rentalid] = true;
}
return true;
}