AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld) { new house[128]; format(house, sizeof(house), "Casas/Casaid%d",houseid); if(!dini_Exists(house)) { dini_Create(house); format(hInfo[houseid][aName], 24, "Ninguem"); dini_Set(house, "Name", "Ninguem"); format(hInfo[houseid][Renter], 24, "Ninguem"); dini_Set(house, "Renter", "Ninguem"); format(hInfo[houseid][Des], 80, "Nada"); dini_Set(house, "Des", "Nada"); format(hInfo[houseid][mensagemv], 100, "sem nome"); dini_Set(house, "mensagemv", "sem nome"); format(hInfo[houseid][Login], 80, "00/00/0000"); dini_Set(house, "Login", "00/00/0000"); hInfo[houseid][Rentable] = 0; dini_IntSet(house, "Rentable", 0); hInfo[houseid][Rentcost] = 0; dini_IntSet(house, "TemDono", 0); dini_IntSet(house, "Rentcost", 0); hInfo[houseid][Cost] = Costa; dini_IntSet(house, "Cost", Costa); hInfo[houseid][Sell] = Sella; dini_IntSet(house, "Sell", Sella); dini_IntSet(house, "Casaid", houseid); hInfo[houseid][Casaid] = houseid; hInfo[houseid][Interior] = Interiora; dini_IntSet(house, "Interior", Interiora); dini_IntSet(house, "Virtualworld", virtualworld); hInfo[houseid][Virtualworld] = virtualworld; hInfo[houseid][Locked] = 0; dini_IntSet(house, "Locked", 0); hInfo[houseid][SemInt] = 0; dini_IntSet(house, "SemInt", 0); hInfo[houseid][liberado] = 0; dini_IntSet(house, "liberado", 0); hInfo[houseid][alarme] = 0; dini_IntSet(house, "alarme", 0); hInfo[houseid][Carrof] = 0; dini_IntSet(house, "Carrof", 0); hInfo[houseid][InteriorX] = interiorX; hInfo[houseid][InteriorY] = interiorY; hInfo[houseid][InteriorZ] = interiorZ; dini_FloatSet(house, "X", interiorX); dini_FloatSet(house, "Y", interiorY); dini_FloatSet(house, "Z", interiorZ); dini_IntSet(house, "RentPay", 0); dini_IntSet(house, "RentGet", 0); cInfo[houseid][HouseCar] = 509; dini_IntSet(house, "HouseCar", 0); cInfo[houseid][CarModel] = 509; dini_IntSet(house, "CarModel", 0); cInfo[houseid][VelX] = 0; cInfo[houseid][VelY] = 0; cInfo[houseid][VelZ] = 0; cInfo[houseid][AnglE] = 0; dini_FloatSet(house, "CarX", 0); dini_FloatSet(house, "CarY", 0); dini_FloatSet(house, "CarZ", 0); dini_FloatSet(house, "Angle", 0); cInfo[houseid][CarColor1] = 0; cInfo[houseid][CarColor2] = 0; dini_IntSet(house, "CarColor1", 0); dini_IntSet(house, "CarColor2", 0); cInfo[houseid][GotCar] = 0; } else { format(hInfo[houseid][aName], 24, dini_Get(house, "Name")); format(hInfo[houseid][Renter], 24, dini_Get(house, "Renter")); format(hInfo[houseid][Des], 80, dini_Get(house, "Des")); format(hInfo[houseid][Des], 80, dini_Get(house, "Des")); format(hInfo[houseid][Login], 80, dini_Get(house, "Login")); hInfo[houseid][Rentable] = dini_Int(house, "Rentable"); hInfo[houseid][TemDono] = dini_Int(house, "TemDono"); hInfo[houseid][Rentcost] = dini_Int(house, "Rentcost"); hInfo[houseid][Cost] = dini_Int(house, "Cost"); hInfo[houseid][Sell] = dini_Int(house, "Sell"); hInfo[houseid][Casaid] = dini_Int(house, "Casaid"); hInfo[houseid][Interior] = dini_Int(house, "Interior"); hInfo[houseid][Locked] = dini_Int(house, "Locked"); hInfo[houseid][SemInt] = dini_Int(house, "SemInt"); hInfo[houseid][liberado] = dini_Int(house, "liberado"); hInfo[houseid][alarme] = dini_Int(house, "alarme"); hInfo[houseid][Carrof] = dini_Int(house, "Carrof"); hInfo[houseid][InteriorX] = dini_Float(house, "X"); hInfo[houseid][InteriorY] = dini_Float(house, "Y"); hInfo[houseid][InteriorZ] = dini_Float(house, "Z"); hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld"); } hInfo[houseid][iconx]=iconX; hInfo[houseid][icony]=iconY; hInfo[houseid][iconz]=iconZ; new string[128]; format(house, sizeof(house), "Casas/Casaid%d",houseid); if(dini_Int(house, "TemDono") == 0) { HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ); format(string, sizeof(string), "Casa %d", dini_Int(house, "Casaid")); Create3DTextLabel(string, 0xFFFFFFAA, iconX, iconY, iconZ+0.80, 20.0, 0, 1); } else if(dini_Int(house, "TemDono") == 1) { HousePickup[houseid] = CreatePickup(1272, 23, iconX, iconY, iconZ); format(string, sizeof(string), "Casa %d", dini_Int(house, "Casaid")); Create3DTextLabel(string, 0xFFFFFFAA, iconX, iconY, iconZ+0.80, 20.0, 0,1); } }
AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
{
new house[128];
format(house, sizeof(house), "Casas/Casaid%d",houseid);
if(!dini_Exists(house))
{
dini_Create(house);
format(hInfo[houseid][aName], 24, "Ninguem");
dini_Set(house, "Name", "Ninguem");
format(hInfo[houseid][Renter], 24, "Ninguem");
dini_Set(house, "Renter", "Ninguem");
format(hInfo[houseid][Des], 80, "Nada");
dini_Set(house, "Des", "Nada");
format(hInfo[houseid][mensagemv], 100, "sem nome");
dini_Set(house, "mensagemv", "sem nome");
format(hInfo[houseid][Login], 80, "00/00/0000");
dini_Set(house, "Login", "00/00/0000");
hInfo[houseid][Rentable] = 0;
dini_IntSet(house, "Rentable", 0);
hInfo[houseid][Rentcost] = 0;
dini_IntSet(house, "TemDono", 0);
dini_IntSet(house, "Rentcost", 0);
hInfo[houseid][Cost] = Costa;
dini_IntSet(house, "Cost", Costa);
hInfo[houseid][Sell] = Sella;
dini_IntSet(house, "Sell", Sella);
dini_IntSet(house, "Casaid", houseid);
hInfo[houseid][Casaid] = houseid;
hInfo[houseid][Interior] = Interiora;
dini_IntSet(house, "Interior", Interiora);
dini_IntSet(house, "Virtualworld", virtualworld);
hInfo[houseid][Virtualworld] = virtualworld;
hInfo[houseid][Locked] = 0;
dini_IntSet(house, "Locked", 0);
hInfo[houseid][SemInt] = 0;
dini_IntSet(house, "SemInt", 0);
hInfo[houseid][liberado] = 0;
dini_IntSet(house, "liberado", 0);
hInfo[houseid][alarme] = 0;
dini_IntSet(house, "alarme", 0);
hInfo[houseid][Carrof] = 0;
dini_IntSet(house, "Carrof", 0);
hInfo[houseid][InteriorX] = interiorX;
hInfo[houseid][InteriorY] = interiorY;
hInfo[houseid][InteriorZ] = interiorZ;
dini_FloatSet(house, "X", interiorX);
dini_FloatSet(house, "Y", interiorY);
dini_FloatSet(house, "Z", interiorZ);
dini_IntSet(house, "RentPay", 0);
dini_IntSet(house, "RentGet", 0);
cInfo[houseid][HouseCar] = 509;
dini_IntSet(house, "HouseCar", 0);
cInfo[houseid][CarModel] = 509;
dini_IntSet(house, "CarModel", 0);
cInfo[houseid][VelX] = 0;
cInfo[houseid][VelY] = 0;
cInfo[houseid][VelZ] = 0;
cInfo[houseid][AnglE] = 0;
dini_FloatSet(house, "CarX", 0);
dini_FloatSet(house, "CarY", 0);
dini_FloatSet(house, "CarZ", 0);
dini_FloatSet(house, "Angle", 0);
cInfo[houseid][CarColor1] = 0;
cInfo[houseid][CarColor2] = 0;
dini_IntSet(house, "CarColor1", 0);
dini_IntSet(house, "CarColor2", 0);
cInfo[houseid][GotCar] = 0;
}
else
{
format(hInfo[houseid][aName], 24, dini_Get(house, "Name"));
format(hInfo[houseid][Renter], 24, dini_Get(house, "Renter"));
format(hInfo[houseid][Des], 80, dini_Get(house, "Des"));
format(hInfo[houseid][Des], 80, dini_Get(house, "Des"));
format(hInfo[houseid][Login], 80, dini_Get(house, "Login"));
hInfo[houseid][Rentable] = dini_Int(house, "Rentable");
hInfo[houseid][TemDono] = dini_Int(house, "TemDono");
hInfo[houseid][Rentcost] = dini_Int(house, "Rentcost");
hInfo[houseid][Cost] = dini_Int(house, "Cost");
hInfo[houseid][Sell] = dini_Int(house, "Sell");
hInfo[houseid][Casaid] = dini_Int(house, "Casaid");
hInfo[houseid][Interior] = dini_Int(house, "Interior");
hInfo[houseid][Locked] = dini_Int(house, "Locked");
hInfo[houseid][SemInt] = dini_Int(house, "SemInt");
hInfo[houseid][liberado] = dini_Int(house, "liberado");
hInfo[houseid][alarme] = dini_Int(house, "alarme");
hInfo[houseid][Carrof] = dini_Int(house, "Carrof");
hInfo[houseid][InteriorX] = dini_Float(house, "X");
hInfo[houseid][InteriorY] = dini_Float(house, "Y");
hInfo[houseid][InteriorZ] = dini_Float(house, "Z");
hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld");
}
hInfo[houseid][iconx]=iconX;
hInfo[houseid][icony]=iconY;
hInfo[houseid][iconz]=iconZ;
new string[128];
format(house, sizeof(house), "Casas/Casaid%d",houseid);
if(dini_Int(house, "TemDono") == 0)
{
HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);
housemapicon[houseid] = CreateDynamicMapIcon(iconX, iconY, iconZ, 31, -1, -1, -1, -1, 100.0);
format(string, sizeof(string), "Casa %d", dini_Int(house, "Casaid"));
Create3DTextLabel(string, 0xFFFFFFAA, iconX, iconY, iconZ+0.80, 20.0, 0, 1);
}
else if(dini_Int(house, "TemDono") == 1)
{
HousePickup[houseid] = CreatePickup(1272, 23, iconX, iconY, iconZ);
housemapicon[houseid] = CreateDynamicMapIcon(iconX, iconY, iconZ, 32, -1, -1, -1, -1, 115.0);
format(string, sizeof(string), "Casa %d", dini_Int(house, "Casaid"));
Create3DTextLabel(string, 0xFFFFFFAA, iconX, iconY, iconZ+0.80, 20.0, 0,1);
}
}
Entendi, vc sabe alguma GM boa para mecher? GM que dк futuro kk |