

Vehicle[GetPlayerVehicleID(playerid)][ID][3]
public OnLoadVehicle();
public OnLoadVehicle()
{
new count = GetTickCount();
print("------------------------");
for(new r = 0; r < cache_num_rows(); ++r)
{
Vehicle[r][ID][0] = cache_get_field_content_int(r, "vehicle_id", MySQL);
Vehicle[r][ID][1] = cache_get_field_content_int(r, "fraction_id", MySQL);
Vehicle[r][ID][2] = cache_get_field_content_int(r, "vehicle_carid", MySQL);
Vehicle[r][Pos][0] = cache_get_field_content_float(r, "vehicle_pos1", MySQL);
Vehicle[r][Pos][1] = cache_get_field_content_float(r, "vehicle_pos2", MySQL);
Vehicle[r][Pos][2] = cache_get_field_content_float(r, "vehicle_pos3", MySQL);
Vehicle[r][Pos][3] = cache_get_field_content_float(r, "vehicle_pos4", MySQL);
Vehicle[r][Color][0] = cache_get_field_content_int(r, "vehicle_color1", MySQL);
Vehicle[r][Color][1] = cache_get_field_content_int(r, "vehicle_color2", MySQL);
cache_get_field_content(r, "vehicle_plate", Vehicle[r][Plate] ,MySQL, 32);
Vehicle[r][ID][3] = AddStaticVehicleEx(Vehicle[r][ID][2], Vehicle[r][Pos][0],Vehicle[r][Pos][1],Vehicle[r][Pos][2],Vehicle[r][Pos][3], Vehicle[r][Color][0], Vehicle[r][Color][1],600);
Vehicle[r][label] = CreateDynamic3DTextLabel(Vehicle[r][Plate], -1, 0.0, 0.0, 1.0, 50.0, INVALID_PLAYER_ID, Vehicle[r][ID][3]);
printf("| VehicleID: %i | Fraction: %i | Vehicle Car: %i | Vehicle Global: %i |", Vehicle[r][ID][0],Vehicle[r][ID][1],Vehicle[r][ID][2],Vehicle[r][ID][3]);
SetVehicleNumberPlate(Vehicle[r][ID][3], Vehicle[r][Plate]);
++ exMAX_VEHICLES;
}
printf("[Rows: %d (%d), Time: %d ms]",cache_num_rows(),exMAX_VEHICLES, GetTickCount() - count);
print("------------------------");
return 1;
}
|
Show your code that shows that sendclientmessage in your screenshot.
|
if(!strcmp(cmd, "/test", true))
{
new string[64];
format(string, sizeof string, "Real ID: %d | ID vehicle: %d",GetPlayerVehicleID(playerid), Vehicle[GetPlayerVehicleID(playerid)][ID][3]);
return SendClientMessage(playerid, -1, string);
}
|
Код:
if(!strcmp(cmd, "/test", true))
{
new string[64];
format(string, sizeof string, "Real ID: %d | ID vehicle: %d",GetPlayerVehicleID(playerid), Vehicle[GetPlayerVehicleID(playerid)][ID][3]);
return SendClientMessage(playerid, -1, string);
}
|