/* Limite de casas 150. [MAX_HOUSE] */
public LoadHouseYes(i)
{
new Rows, Field, Str[202], xRL[128], xH_Icone;
cache_get_data(Rows, Field, Connect);
cache_get_field_content(0, "id", Str, Connect);
xPlayerHouse[i][xH_ID] = strval(Str);
cache_get_field_content(0, "Dono", Str, Connect);
xPlayerHouse[i][xH_Dono] = strval(Str);
cache_get_field_content(0, "hEX", Str, Connect);
xPlayerHouse[i][xH_EX] = floatstr(Str);
cache_get_field_content(0, "hEY", Str, Connect);
xPlayerHouse[i][xH_EY] = floatstr(Str);
cache_get_field_content(0, "hEZ", Str, Connect);
xPlayerHouse[i][xH_EZ] = floatstr(Str);
cache_get_field_content(0, "Interior", Str, Connect);
xPlayerHouse[i][xH_Interior] = strval(Str);
cache_get_field_content(0, "Mundo", Str, Connect);
xPlayerHouse[i][xH_Mundo] = strval(Str);
cache_get_field_content(0, "Venda", Str, Connect);
xPlayerHouse[i][xH_Venda] = strval(Str);
cache_get_field_content(0, "Preco", Str, Connect);
xPlayerHouse[i][xH_Preco] = strval(Str);
cache_get_field_content(0, "Icone", Str, Connect);
xH_Icone = strval(Str);
// Cria as mensagems e icones nos lugares das casas.
if(xPlayerHouse[i][xH_Venda] == 1)
{
CreateDynamicPickup(xH_Icone, 23, xPlayerHouse[i][xH_EX], xPlayerHouse[i][xH_EY], xPlayerHouse[i][xH_EZ], -1, -1, -1, 20.0);
format(xRL, sizeof(xRL), "{008080}[Imovel а venda]\nPreзo: %i\nID: %i\n[Utilize]: /comprarcasa", xPlayerHouse[i][xH_Preco], xPlayerHouse[i][xH_ID]);
x_3DHouse[i] = Create3DTextLabel(xRL, xCor_Branco, xPlayerHouse[i][xH_EX], xPlayerHouse[i][xH_EY], xPlayerHouse[i][xH_EZ], 20.0, 0, 0);
}
if(xPlayerHouse[i][xH_Venda] == 0)
{
new xNome[MAX_HOUSE];
format(xPlayerHouse[i][xH_Dono], 21, "%s", xNome[i]);
/*vBUG*/printf("ID casa: %i, Dono: %s", xPlayerHouse[i][xH_ID], xNome[i]);
// printf("Dono Empresa %s", xNome[i]);
CreateDynamicPickup(xH_Icone, 23, xPlayerHouse[i][xH_EX], xPlayerHouse[i][xH_EY], xPlayerHouse[i][xH_EZ], -1, -1, -1, 20.0);
format(xRL, sizeof(xRL), "{008080}[Imуvel ocupado]\nDono: %s\nID: %i\n[Utilize]: /entrar", xNome[i], xPlayerHouse[i][xH_ID]);
x_3DHouse[i] = Create3DTextLabel(xRL, xCor_Branco, xPlayerHouse[i][xH_EX], xPlayerHouse[i][xH_EY], xPlayerHouse[i][xH_EZ], 20.0, 0, 0);
}
return 1;
}
xPlayerHouse[i][xH_Dono] = strval(Str);
pawn Код:
|
// Й de outra forma?
format(xPlayerHouse[i][xH_Dono], 21, "%s", xNome);
Format resolve o problema. й certo. Й so no parametro de quantidade de caracteres voces aumentar, inves de 21 coloca 32 ou 64
|