PDA

View Full Version : vehicle labeling problem


ShoortyFl
05/05/2016, 12:27 PM
i have a problem with labeling vehicles, i mean puting 3d text on them, i've never did this before, so i dont know what is going on:

case THREAD_UCITAJMOTORE:
{
if(szRows)
{
new id;
for(new i = 0; i < szRows; i++)
{
id = cache_get_field_content_int(i, "ID");

cache_get_field_content(i, "Vlasnik", MoInfo[id][Vlasnik]);

MoInfo[id][PozX] = cache_get_field_content_float(i, "PozX");
MoInfo[id][PozY] = cache_get_field_content_float(i, "PozY");
MoInfo[id][PozZ] = cache_get_field_content_float(i, "PozZ");
MoInfo[id][PozA] = cache_get_field_content_float(i, "PozA");
MoInfo[id][Model] = cache_get_field_content_int(i, "Model");
MoInfo[id][Cena] = cache_get_field_content_int(i, "Cena");
MoInfo[id][VW] = cache_get_field_content_int(i, "VW");
MoInfo[id][Interior] = cache_get_field_content_int(i, "Interior");
MoInfo[id][Zakljucan] = cache_get_field_content_int(i, "Zakljucan");
MoInfo[id][Boja1] = cache_get_field_content_int(i, "Boja1");
MoInfo[id][Boja2] = cache_get_field_content_int(i, "Boja2");
MoInfo[id][ImaVlasnika] = cache_get_field_content_int(i, "ImaVlasnika");

new str[28];
format(str, sizeof(str), "%s", MoInfo[id][Vlasnik]);

MoInfo[id][mOwned] = AddStaticVehicleEx(MoInfo[id][Model], MoInfo[id][PozX], MoInfo[id][PozY], MoInfo[id][PozZ]+0.2, MoInfo[id][PozA], MoInfo[id][Boja1], MoInfo[id][Boja2], 300);
MoLabel[MoInfo[id][mOwned]] = Create3DTextLabel(str, 0xF69521FF, FInfo[id][PozX], FInfo[id][PozY], FInfo[id][PozZ], 30.0, 0, 0);

Attach3DTextLabelToVehicle( MoLabel[MoInfo[id][mOwned]] , MoInfo[id][mOwned], 0.0, 0.0, 2.0);
}
}
SpawnedMotora = szRows;
}