19.04.2015, 22:23
PHP код:
stock CreateHouse(Filename[], Cost, Float:Pickupx, Float:Pickupy, Float:Pickupz, Float:Telex, Float:Teley, Float:Telez, interior, sell)
{
if(!dini_Exists(house))
{
dini_Create(house);
}
HouseCount ++;
new ID = HouseCount; //HouseID
format(HouseInfo[ID][HouseNames], 60, "%s", Filename); //Saves the HouseName into a variable
HouseInfo[ID][HouseCost] = Cost;
HouseInfo[ID][PickupX] = Pickupx;
HouseInfo[ID][Virtual] = 2000000 + ID;
HouseInfo[ID][PickupY] = Pickupy;
HouseInfo[ID][PickupZ] = Pickupz;
HouseInfo[ID][TeleX] = Telex;
HouseInfo[ID][TeleY] = Teley;
HouseInfo[ID][TeleZ] = Telez;
HouseInfo[ID][Interior] = interior;
HouseInfo[ID][HouseSell] = sell;
format(HouseInfo[ID][HouseOwner], 24, "gj9043jg-er((23");
if(strlen(dini_Get(house, Filename))) //This is to see if there is any owner.
{
format(HouseInfo[ID][HouseOwner], 24, "%s", dini_Get(house, Filename));
HouseInfo[ID][Owned] = 1;
PickupID[ID] = CreatePickup(1272, 23, Pickupx, Pickupy, Pickupz, -1); //Creates the pickup :).
}
else
{
PickupID[ID] = CreatePickup(1273, 23, Pickupx, Pickupy, Pickupz, -1); //Creates the pickup :).
HouseInfo[ID][Owned] = 0;
}
Create3DTextLabel("House", 0x00A0F6AA, Pickupx, Pickupy, Pickupz + 0.75, 15.0, 0, 1);
}