[Ajuda] string
#8

Quote:
Originally Posted by Ermanhaut
Посмотреть сообщение
Vocк tem que checar se hб uma textdraw criada para aquela casa, se hб, vocк deve atualiza-la, nгo criar outra.

Код:
new Text3D:LabelCasa[MAX_CASAS]; 

CarregarCasa(casas) 
{ 
    new query[250]; 
    new dono[64]; 
    new PickupId; 
     
    for(new c = 0; c < MAX_CASAS; c++) 
     { 
        format(query, sizeof(query), "Casas/Casa%d.ini", c); 

        houseData[c][houseX] = DOF2_GetFloat(query, "PosX"); 
        houseData[c][houseY] = DOF2_GetFloat(query, "PosY"); 
        houseData[c][houseZ] = DOF2_GetFloat(query, "PosZ"); 
        houseData[c][Dono] = DOF2_GetString(query, "Dono")); 
        houseData[c][PrecoH] = DOF2_GetInt(query, "Preco"); 
        houseData[c][CasaID] = DOF2_GetInt(query, "CasaId"); 

        PickupId = CreateDynamicPickup(1273, 1, houseData[c][houseX], houseData[c][houseY], houseData[c][houseZ], -1, -1, -1, 3.0); 
        DOF2_SetInt(query, "PickupId", PickupId); 

        format(STRX, sizeof(STRX), "{00FFFF}Dono(a): {FFFFFF}%s \n\n{00FFFF}CasaID:{FFFFFF}%d", houseData[c][Dono], c);
        if(LabelCasa[c] == Text3D:INVALID_3DTEXT_ID) {
            LabelCasa[c] = CreateDynamic3DTextLabel(STRX, -1, houseData[c][houseX], houseData[c][houseY], houseData[c][houseZ], 30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 3.0); 
        }
        else {
            Update3DTextLabelText(LabelCasa[c], -1, STRX);
        }
    } 
    return 1; 
}
Dessa forma ela nem й carregada
Reply


Messages In This Thread
string - by iWiNeR - 12.06.2018, 16:39
Re: string - by Minerva - 12.06.2018, 16:45
Re: string - by iWiNeR - 12.06.2018, 16:55
Re: string - by Ermanhaut - 12.06.2018, 17:04
Re: string - by AutoMatic2 - 13.06.2018, 00:09
Re: string - by iWiNeR - 13.06.2018, 16:45
Re: string - by Ermanhaut - 13.06.2018, 16:52
Re: string - by iWiNeR - 13.06.2018, 17:12
Re: string - by AutoMatic2 - 13.06.2018, 21:09
Re: string - by iWiNeR - 13.06.2018, 21:24

Forum Jump:


Users browsing this thread: 1 Guest(s)