pawn Код:
for(new c = 0; c < MAX_CASAS; c++)
{
format(string, sizeof(string), "/Casas/casa%d.ini", c);
if(dini_Exists(string)){
new pickupid;
if(dini_Int(string, "TDono") == 0){
pickupid = CreatePickup(1273, 1, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ"), -1);
dini_IntSet(string, "Id", pickupid);
new string2[222];
format(string2, sizeof(string2), "Casa N° %d\nDono: Ninguem\nValor: R$ %d\n/comprarcasa", c,dini_Int(string, "Preco"));
Create3DTextLabel(string2,0xFFFFFFAA, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ")+0.75,20.0,0,1);
} else {
if(dini_Int(string,"TDono") == 1){
pickupid = CreatePickup(1272, 1, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ"), -1);
dini_IntSet(string, "Id", pickupid);
new string2[222];
format(string2, sizeof(string2), "Casa N° %d\nDono %s\nValor R$ %d", c,dini_Get(string, "Dono"),dini_Int(string, "Preco"));
Create3DTextLabel(string2,0xFFFFFFAA, dini_Float(string, "PosX"), dini_Float(string, "PosY"), dini_Float(string, "PosZ")+0.75,20.0,0,1);
}
}
proximacasa++;
}
}