if(VehForSale[vehicleid] == 0)
{
printf("%d veh for sale", VehForSale[vehicleid]);
VehForSale[vehicleid] = 1;
printf("%d veh for sale after", VehForSale[vehicleid]);
new string[128];
new name = VehModel[vehicleid] - 400;
printf("%d model", VehModel[vehicleid]);
new Float: x, Float: y, Float: z;
MySQL_SetInteger(VehicleSQLID[vehicleid], "VehForSale", 1, "vehicles");
printf("%d vehsqlid", VehicleSQLID[vehicleid]);
GetVehiclePos(vehicleid, x,y,z);
format(string, sizeof(string), "%s, $%d, %s", VehicleNames[name], VehPrice[vehicleid], VehPlate[vehicleid]);
VehicleLabel[vehicleid] = CreateDynamic3DTextLabel(string, COLOUR_WHITE, x,y, z, 100.0, INVALID_PLAYER_ID, vehicleid, 0, 0, -1, -1, 20.0);
Attach3DTextLabelToVehicle(VehicleLabel[vehicleid] ,vehicleid,0.0,0.0,0.0);
printf("%s Veh label", string);
SendClientMessage(playerid, COLOUR_WHITE, "Business vehicle is now for sale.");
}
[16:43:50] 8 biz owned [16:43:50] 8 veh biz id [16:43:50] 8 biz owned [16:43:50] 8 veh biz id [16:43:50] 0 veh for sale [16:43:50] 1 veh for sale after [16:43:50] 579 model [16:43:50] 2 vehsqlid [16:43:50] Huntley, $5000, BRLHZIV Veh label [16:43:59] 8 biz owned [16:43:59] 8 veh biz id |
new Text3D: VehicleLabel[MAX_VEHICLES];
if(VehForSale[vehicleid] == 0) { printf("%d veh for sale", VehForSale[vehicleid]); VehForSale[vehicleid] = 1; printf("%d veh for sale after", VehForSale[vehicleid]); new string[128]; new name = VehModel[vehicleid] - 400; printf("%d model", VehModel[vehicleid]); new Float: x, Float: y, Float: z; MySQL_SetInteger(VehicleSQLID[vehicleid], "VehForSale", 1, "vehicles"); printf("%d vehsqlid", VehicleSQLID[vehicleid]); GetVehiclePos(vehicleid, x,y,z); format(string, sizeof(string), "%s, $%d, %s", VehicleNames[name], VehPrice[vehicleid], VehPlate[vehicleid]); VehicleLabel[vehicleid] = Create3DTextLabel(string, COLOUR_WHITE, x,y, z, 100.0, INVALID_PLAYER_ID, vehicleid, 0, 0, -1, -1, 20.0); Attach3DTextLabelToVehicle(VehicleLabel[vehicleid] ,vehicleid,0.0,0.0,0.0); printf("%s Veh label", string); SendClientMessage(playerid, COLOUR_WHITE, "Business vehicle is now for sale."); }
Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);