06.02.2010, 13:49
#include <a_samp>
#include <dudb>
#include <dini>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//----------------------------
//----------------------------
// Full house script by Antironix!
// Just don't remove the credits!
//----------------------------
//----------------------------
#define MAX_DISTANCE_TO_PROP 1.5
#define MAX_HOUSES 100
#define MAX_RENTCOST 1000
#define MIN_RENTCOST 500
#define MAX_BUY_CARS 8
#define CAR_DELIVER_TIME 1 //The time that it takes that your car will be delivered. In hours.
//buyable cars
enum CarInfo {CarModel,CarName[24],CarCost};
new Buyable_Cars[MAX_BUY_CARS][CarInfo] =
{ //Modelid, Buy Name, Price
{411,"Infernus",0},
{522,"NRG-500",50000},
{451,"Turismo",50000},
{541,"Bullet",50000},
{415,"Cheetah",50000},
{429,"Banshee",50000},
{494,"Hotring",50000},
{556,"Monster",50000}
};
//----------------------------
//----------------------------
#define c_y 0xFFFF00AA
#define c_r 0xAA3333AA
new HousePickup[MAX_HOUSES];
new playerinterior[MAX_PLAYERS]=-1;
new Float:housex, Float:housey, Float:housez;
new housemapicon[MAX_PLAYERS];
new playerworld[MAX_PLAYERS];
new bool:KillVeh[MAX_VEHICLES] = false;
forward rentfee();
forward newcar();
forward KillVehicle(carid);
enum HouseInfo
{
Name[24],
Renter[24],
Rentable,
Rentcost,
Cost,
Sell,
Interior,
Virtualworld,
Locked,
Float:InteriorX,
Float:InteriorY,
Float:InteriorZ,
Float:iconx,
Float:icony,
Float:iconz,
Rentfee
}
new hInfo[MAX_HOUSES][HouseInfo];
enum HouseCarInfo
{
HouseCar,
GotCar,
Houseid,
CarModel,
Float:CarX,
Float:CarY,
Float:CarZ,
CarColor1,
CarColor2,
Respawn_Delay,
NewCar
}
new cInfo[MAX_HOUSES][HouseCarInfo];
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Simple House System by Antironix");
print("--------------------------------------\n");
AddHouse(0, 1442.9769,-629.5287,95.7186, 2317.8201,-1024.7500,1050.2109, 0, 0, 9, 0);
AddHouse(1, 1980.9896,-1719.0171,17.0304, 328.1465,-1478.4457,1084.4375, 0, 0, 15, 0);
AddHouse(3, 2207.5793,-1100.8376,31.5547, 2535.83,-1674.32,1015.50, 1000, 1000, 1, 0);
AddHouse(4, 2145.4905,-1085.0579,24.7751, 2260.76,-1210.45,1049.02, 1000, 1000, 10, 0);
AddHouse(5, 2140.4553,-1082.8198,24.6936, 2262.83,-1137.71,1050.63, 1000, 1000, 10, 0);
AddHouse(6, 2099.7051,-1052.0504,28.4995, 2365.42,-1131.85,1050.88, 1000, 1000, 9, 0);
AddHouse(8, 2209.4075,-1151.2382,29.7969, 262.7553,-47.821197,1002.130981,0,0,2,0);
AddHouseCar(1, 429, 1975.3328,-1709.8126,15.9688, 0, 0, 5*60*1000);//5 min respawn delay
SetTimer("rentfee", 1*60*60*1000, 1);//1 hour
SetTimer("newcar", CAR_DELIVER_TIME*60*10*1000,1);//1 hour
return 0;
}
public OnFilterScriptExit()
{
for(new i=0;i<MAX_HOUSES;i++)
{
DestroyPickup(HousePickup[i]);
DestroyVehicle(cInfo[i][HouseCar]);
}
return 0;
}
#else
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(buy,3,cmdtext);
dcmd(sell,4,cmdtext);
dcmd(enter,5,cmdtext);
dcmd(exit,4,cmdtext);
dcmd(lock,4,cmdtext);
dcmd(unlock,6,cmdtext);
dcmd(home,4,cmdtext);
dcmd(setrent,7,cmdtext);
dcmd(rent,4,cmdtext);
dcmd(unrent,6,cmdtext);
dcmd(house,5,cmdtext);
dcmd(housestats,10,cmdtext);
dcmd(getrent,7,cmdtext);
dcmd(payrent,7,cmdtext);
dcmd(ordercar,8,cmdtext);
return 0;
}
#include <dudb>
#include <dini>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//----------------------------
//----------------------------
// Full house script by Antironix!
// Just don't remove the credits!
//----------------------------
//----------------------------
#define MAX_DISTANCE_TO_PROP 1.5
#define MAX_HOUSES 100
#define MAX_RENTCOST 1000
#define MIN_RENTCOST 500
#define MAX_BUY_CARS 8
#define CAR_DELIVER_TIME 1 //The time that it takes that your car will be delivered. In hours.
//buyable cars
enum CarInfo {CarModel,CarName[24],CarCost};
new Buyable_Cars[MAX_BUY_CARS][CarInfo] =
{ //Modelid, Buy Name, Price
{411,"Infernus",0},
{522,"NRG-500",50000},
{451,"Turismo",50000},
{541,"Bullet",50000},
{415,"Cheetah",50000},
{429,"Banshee",50000},
{494,"Hotring",50000},
{556,"Monster",50000}
};
//----------------------------
//----------------------------
#define c_y 0xFFFF00AA
#define c_r 0xAA3333AA
new HousePickup[MAX_HOUSES];
new playerinterior[MAX_PLAYERS]=-1;
new Float:housex, Float:housey, Float:housez;
new housemapicon[MAX_PLAYERS];
new playerworld[MAX_PLAYERS];
new bool:KillVeh[MAX_VEHICLES] = false;
forward rentfee();
forward newcar();
forward KillVehicle(carid);
enum HouseInfo
{
Name[24],
Renter[24],
Rentable,
Rentcost,
Cost,
Sell,
Interior,
Virtualworld,
Locked,
Float:InteriorX,
Float:InteriorY,
Float:InteriorZ,
Float:iconx,
Float:icony,
Float:iconz,
Rentfee
}
new hInfo[MAX_HOUSES][HouseInfo];
enum HouseCarInfo
{
HouseCar,
GotCar,
Houseid,
CarModel,
Float:CarX,
Float:CarY,
Float:CarZ,
CarColor1,
CarColor2,
Respawn_Delay,
NewCar
}
new cInfo[MAX_HOUSES][HouseCarInfo];
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Simple House System by Antironix");
print("--------------------------------------\n");
AddHouse(0, 1442.9769,-629.5287,95.7186, 2317.8201,-1024.7500,1050.2109, 0, 0, 9, 0);
AddHouse(1, 1980.9896,-1719.0171,17.0304, 328.1465,-1478.4457,1084.4375, 0, 0, 15, 0);
AddHouse(3, 2207.5793,-1100.8376,31.5547, 2535.83,-1674.32,1015.50, 1000, 1000, 1, 0);
AddHouse(4, 2145.4905,-1085.0579,24.7751, 2260.76,-1210.45,1049.02, 1000, 1000, 10, 0);
AddHouse(5, 2140.4553,-1082.8198,24.6936, 2262.83,-1137.71,1050.63, 1000, 1000, 10, 0);
AddHouse(6, 2099.7051,-1052.0504,28.4995, 2365.42,-1131.85,1050.88, 1000, 1000, 9, 0);
AddHouse(8, 2209.4075,-1151.2382,29.7969, 262.7553,-47.821197,1002.130981,0,0,2,0);
AddHouseCar(1, 429, 1975.3328,-1709.8126,15.9688, 0, 0, 5*60*1000);//5 min respawn delay
SetTimer("rentfee", 1*60*60*1000, 1);//1 hour
SetTimer("newcar", CAR_DELIVER_TIME*60*10*1000,1);//1 hour
return 0;
}
public OnFilterScriptExit()
{
for(new i=0;i<MAX_HOUSES;i++)
{
DestroyPickup(HousePickup[i]);
DestroyVehicle(cInfo[i][HouseCar]);
}
return 0;
}
#else
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(buy,3,cmdtext);
dcmd(sell,4,cmdtext);
dcmd(enter,5,cmdtext);
dcmd(exit,4,cmdtext);
dcmd(lock,4,cmdtext);
dcmd(unlock,6,cmdtext);
dcmd(home,4,cmdtext);
dcmd(setrent,7,cmdtext);
dcmd(rent,4,cmdtext);
dcmd(unrent,6,cmdtext);
dcmd(house,5,cmdtext);
dcmd(housestats,10,cmdtext);
dcmd(getrent,7,cmdtext);
dcmd(payrent,7,cmdtext);
dcmd(ordercar,8,cmdtext);
return 0;
}