Penls house
#1

I have Penls, but i can't see any house. How can I add houses? And how can i see the pickups from houses?
Reply
#2

Ask in that topic.
Reply
#3

that topic is dead
Reply
#4

Hmm i have found @ the internet wayback machine the old topic from penls, and i see a tutorial posted by Jashugan how i can add a house:
ADDING HOUSES FULL TUTORIAL (you can also do it with sneaky but he doesn't tell you enough and you will bug your script up):

Go in front of the entrance of the house you want to make, and type /save houseentrance

Then take a normal sized car, park it somewhere close, and save the position also (for the housecar).

Then go into your property.cfg and make a new line which will start by the first 3 variable of the position of the entrance:

entranceX,entranceY,entranceZ,

Then you follow by the position inside the interior (interior IDs+coordinates here: https://sampwiki.blast.hk/index.php/InteriorIDs)

which will give you:

entranceX, entranceY,entranceZ,interiorX,interiorY,interiorZ,

Then you add 6 zeros:

entranceX, entranceY,entranceZ,interiorX,interiorY,interiorZ, 0,0,0,0,0,0,

Then you add the name of owner (i just use The State as default, when you buy the house ingame the name will change) followed by a short description of the house and its price:

entranceX, entranceY,entranceZ,interiorX,interiorY,interiorZ, 0,0,0,0,0,0,NameOfOwner,DescriptionOfHouse,Price,

Then you add two zeros (health/armor upgrades which you will buy ingame) followed by the interior ID of the house:

entranceX, entranceY,entranceZ,interiorX,interiorY,interiorZ, 0,0,0,0,0,0,NameOfOwner,DescriptionOfHouse,Price,h ealthupgrade,armorupgrade,interiorID,

After that: interiorID, locked(1)/unlocked(0), owned(1)/notowned(0), numberofrooms, rentfee, rentable(1) or not (0), housebank, housecar modelID, carcolor1, carcolor2, timesincelastlogin, level

Then, once your ligne in property.cfg is done, open your script and look for this line:
Quote
new HouseInfo[34][hInfo];

Change the "34" to a "35" (if you add only 1 house).

Then look for

Code:
new Float:HouseCarSpawns[34][4] = {
and change the "34" to a "35" to tell the script to add one more housecar. You also have to add the car to the HouseCar list, so add this line at the end of the list:


Code:
{housecarX,housecarY,housecarZ,housecarANGLE}//your new housecar
Remember to add a comma at the end of the line ABOVE this one, (of course change housecarX, Y, Z by the coordinates you saved when you parked the car near the entrance of your new house earlier on) so your script will look like this:

Code:
new Float:HouseCarSpawns[34][4] = {
{2342.5,-1039.8,52.5,180.1809},//flash //trailer 0
{2064.4,-1694.4,13.1,271.1561},//elergy 1
{2246.9573,-1909.0677,14.2518,177.5861},
{1109.8,-968.0,42.7,0.0},//house3
{2497.6274,-2025.6306,13.2521,355.4281}, // hosue 4
{2645.0,-1990.8,13.1,180.0},//balde hr - 5
{2503.5977,-1364.4044,28.2365,357.6592},//house 6
{1910.5149,-1120.5304,25.4493,177.8350},//house7
{828.8,-887.0,68.5,230.7095},//blistac 8
{2149.6,-1610.9,14.0,90.7904},//remington 9
{760.1,-1687.8,4.3,180.6},//10
{645.5,-1616.1,14.9,0.0},//supergt 11
{1830.7705,-1404.1754,13.1338,269.9360},//house 12
{1679.2,-1462.9,13.3,270.0},//comet 13
{959.5864,-901.0845,45.8584,177.3087},//newhouse cheeta 14
{2445.8,-1326.8,23.6,18.4},
{2845.9,-1286.8,18.9,90.0},//savanna 8 house 16
{2159.8,-1803.9,13.3,271.4}, //blank 17
{2485.1,-1653.4,13.1,90.7904},//bullit 10 house 18
{977.6,-829.0,95.6,0.0},//hotring 2 house 19
{1514.0,-694.6,94.5,90.0},//bullit 10 house 20
{1246.7,-1107.6,25.5,266.4},//rancher 5 house 21
{831.7,-857.5,69.9,180.0},//bucaner//hotrod 6 house 22
{1007.9,-659.4,121.1,130.6194},//cheetah 23
{1110.0,-726.4,100.1,90.0},//zr350 //house 24
{259.7,-1221.0,74.7,202.0011},//infurnus house25
{1463.7,-901.7,55.8,359.0},//euros //house26
{1440.1,-890.6,51.2,0.0},//banshee //house 27
{1040.7,-1053.7,31.7,0.0},//banshee //house 19
{1146.2,-2046.5,69.0,301.3},
//{1880.2,-2022.3,13.3,180.0},//banshee //house 20 //move
{963.5,-1830.8,12.6,254.8},//banshee //house 21
{2088.6,-1140.6,25.5,90.8},//banshee //house 21
{904.5523,-1454.7026,12.9286,269.2811},
{1534.1,-841.5,65.0,93.2},//banshee //house 21
{housecarX,housecarY,housecarZ,housecarANGLE}//your new housecar <--------- NOTICE no comma at the end of this one, because its the last line.
};

Think you're done? Don't think too fast. As you know, House Cars are at the very TOP of the vehicle ID list in your pen1 script. That means that if you add 1 housecar, you must change the ID number for CopCars, Planes, Trucks, Ambulances and most importantly: Rentcars.

To do this, go to the top of your script, and search for CopCar until you find something like this:


Code:
public IsACopCar(carid)

You must change the IDs for this whole part to add the extra housecar. For example, for CopCars you have a line that says:

Code:
if((carid >= 35) && (carid <= 60))

You see the 35? This means that the housecar you just added is now considered a cop car by the script, and it will turn you orange (criminal) if you enter it. So, simply edit the 35 and every ID you see so that the script recognizes the housecar for what it is: a housecar. Do this for the whole part:


Code:
public IsAPlane(carid)
{
if((carid >= 66<---put 67 here && carid <=71<---put 72 here) || carid == 60<---put 61 here)
{
return 1;
}
return 0;
}

public IsACopCar(carid)
{
if((carid >= 35<---put 36 here) && (carid <= 60<---put 61 here))
{
return 1;
}
return 0;
}

public IsAnAmbulance(carid)
{
if((carid >= 61<---put 62 here) && (carid <= 63<---put 64 here))
{
return 1;
}
return 0;
}

public IsATruck(carid)
{
if(carid >= 78<---put 79 here && carid <= 81<---put 82 here)
{
return 1;
}
return 0;
}

Finish by looking for "PlayerHaul" under OnGameModeInIt and change the IDs to the comp truck IDs.

Now that you've successfully taken care of copcar, ambulance, plane and truck IDs, lets take a look at Rentcar IDs. Search for "/rentcar" in your script, and you will come to a part of script with two lines:


Code:
if(newcar >= 71 && newcar <= 74)
and

Code:
if(newcar >= 75 && newcar <= 77)

Same thing as earlier, add 1 to the vehicle IDs to debug part of the rentcars. First line is for the first biz, second line for the second biz. But we're not quite done yet. Search for "/rentcar" again, you will find this:


Code:
if(strcmp(cmd, "/rentcar", true) == 0)
{
if(GetPlayerVehicleID(playerid) >= 71 && GetPlayerVehicleID(playerid) <= 77) <--- BE CAREFUL! This line represents rentcars as a WHOLE, that means 71 to 77 includes ALL the rentcars in your script. Just add 1 to each number if you added 1 house
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if(GetPlayerVehicleID(playerid) >= 71 && GetPlayerVehicleID(playerid) <= 74)<-- same as above here, add 1 to both numbers, this represents the SECOND rentcar biz cars
{
if(BizzInfo[9][bProd] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == 9)
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) < BizzInfo[9][bEntcost])
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash");
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[9][bEntcost]);
BizzInfo[9][bTakings] = BizzInfo[9][bTakings]+BizzInfo[9][bEntcost];
BizzInfo[9][bProd]--;
}
if(GetPlayerVehicleID(playerid) >= 75 && GetPlayerVehicleID(playerid) <= 77)<---same as above here also, add 1 to the numbers. This line represents the rentcars for the FIRST biz
{
if(BizzInfo[8][bProd] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == Cool
{
GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) < BizzInfo[8][bEntcost])
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash");
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[8][bEntcost]);
BizzInfo[8][bTakings] = BizzInfo[8][bTakings]+BizzInfo[8][bEntcost];
BizzInfo[8][bProd]--;
}

Now, you've surely noticed that when you get into a rentcar, if you want to EXIT without renting, you have to type /exit, so that must mean the /exit command also has exceptions depending on carid. So, in your script, search for the command /exit. Towards the end of the command's script, right before the command /home, find this line:

Code:
if(GetPlayerVehicleID(playerid) >= 71<---Add 1 here && GetPlayerVehicleID(playerid) <= 77<---Add 1 here as well)

Once you have done this, compile, run and enjoy, you're done Smiley Remember that for EVERY house you add, you add a housecar, and for EVERY housecar you add, you bump all these IDs up 1 notch.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)