|
format(query,sizeof(query),"INSERT INTO `vehiculos` (vcModelo, vcPosX, vcPosY, vcPosZ, vcAngle,vcComprado,vcPrecio,vcColor1,vcColor2,vcPr opietario, vcConceID,vcFaccion,vcID) VALUES ('%d','%f','%f','%f','%f','0','%d','%d','%d','Conc esionario','%d','%d')",GetVehicleModel(GetPlayerVe hicleID(playerid)),X,Y,Z,Angle,precio,color1,color 2,conced,faccion); mysql_function_query(Conecction, query, true, "CargarVehiculos", "i", 1); |
|
public CargarVehiculos(resultid, extraid, ConnectionHandle) { new Rows, Field; if(resultid != 0) { cache_get_data(Rows, Field); } switch(resultid) { case 3: { for(new v = 1; v<MAX_VEHICLES; v++) { new content[30]; cache_get_field_content(v, "vcID",content); VInfo[v][vID] = strval(content); cache_get_field_content(v, "vcComprado",content); VInfo[v][vComprado] = strval(content); cache_get_field_content(v, "vcModelo",content); VInfo[v][vModelo] = strval(content); cache_get_field_content(v, "vcPosX",content); VInfo[v][vPosX] = floatstr(content); cache_get_field_content(v, "vcPosY",content); VInfo[v][vPosY] = floatstr(content); cache_get_field_content(v, "vcPosZ",content); VInfo[v][vPosZ] = floatstr(content); cache_get_field_content(v, "vcAngle",content); VInfo[v][vAngle] = floatstr(content); cache_get_field_content(v, "vcColor1",content); VInfo[v][vColor1] = strval(content); cache_get_field_content(v, "vcColor2",content); VInfo[v][vColor2] = strval(content); cache_get_field_content(v, "vcPrecio",content); VInfo[v][vPrecio] = strval(content); cache_get_field_content(v, "vcPropietario",VInfo[v][vPropietario]); cache_get_field_content(v, "vcFaccion", VInfo[v][vFaccion]); cache_get_field_content(v, "vcConceID",content); VInfo[v][vConceID] = strval(content); VInfo[v][vID] = v; CreateVehicle(VInfo[v][vModelo], VInfo[v][vPosX], VInfo[v][vPosY], VInfo[v][vPosZ], VInfo[v][vAngle], VInfo[v][vColor1], VInfo[v][vColor2], 550); if(VInfo[v][vComprado] == 0) { new string[350]; format(string,sizeof(string), "{C9EB32}[Vehiculo en venta]:\nPropietario: Concesionario\nVehiculo: %s\nPrecio: $%d",NombreV(VInfo[v][vID]),VInfo[v][vPrecio]); new Text3D:text = Create3DTextLabel(string,-1,0.0,0.0,0.0,10.0,0,1); Attach3DTextLabelToVehicle(text, VInfo[v][vID],0.0,0.0,0.0); } } } } return 1; } |