Szerző Téma: Garhouse 3.0 Magyarosítás  (Megtekintve 2557 alkalommal)

Garhouse 3.0 Magyarosítás
« Dátum: 2012. július 27. - 22:45:16 »
0 Show voters
Hali, lehet nagy kérés de letudná valaki magyarosítani a Garhouse 3.0 -át? (linket nem tudok adni)

Garhouse 3.0 Magyarosítás
« Válasz #1 Dátum: 2012. július 28. - 02:41:37 »
0 Show voters
hát lécives linkeljél mer nem találtam csak v2-t

Garhouse 3.0 Magyarosítás
« Válasz #2 Dátum: 2012. július 28. - 14:33:04 »
0 Show voters
Hát megpróbálom elkérni  .. mert nekem is csak úgy berakták.. mert én v2 õt adtam neki de 3 at rakta be :D

Dupla hozzászólás automatikusan összefûzve. ( 2012. július 29. - 15:14:05 )

Nincs link mert törlõdött.. de akkor leírom az egészet
 
 //==============================================================================
//                         GarHouse v2.0 by [03]Garsino!
//==============================================================================
// - Credits to DracoBlue for udb_hash.
// - Credits to Incognito for his awesome streamer.
// - Credits to Y_Less for sscanf2, y_ini and foreach.
// - Credits to Zeex for ZCMD.
// - Credits to whoever made GetPosInFrontOfPlayer.
// - Credits to ~Cueball~, Betamaster, Mabako and Simon for the a_zones.inc array.
// - Thanks to cessil for helping me with a weird issue with ShowInfoBoxEx.
// - Thanks to everyone who gave me ideas for this house system and helped me find bugs.
//==============================================================================
//                                  Changelog v2.0
//==============================================================================
// - [script] Rewrote script so that it now uses y_ini instead of dini. Should be a lot faster.
// - [script] Script now uses an enum instead of directly loading the values from the files.
// - [script] Script now uses foreach instead of regular player loops.
// - [Added] Added another house selling option. People can set their house for sale for a price they choose (between MIN_HOUSE_VALUE and MAX_HOUSE_VALUE).
//    - People can buy the house while the houseowner is offline. The houseowner will then get the money and a message upon next connect.
// - [Added] Added cancelling option for house selling in /housemenu.
// - [Added] Additional updates around the script.
// - [Added] Added house privacy option in /housemenu. The house owner can open/close their house for guests.
// - [script] Script now uses zcmd instead of dcmd for increased speed.
// - [Added] Housecars are now personal and can only be driven by the owner of the house.
// - [Added] It now uses SA:MP 0.3c colour embedding and the option to only use 1 button - you must update to SA:MP 0.3c to use this version unless you edit the script yourself.
// - [Added] Added dynamic house interiors - the data is loaded from files now. You don\'t have to worry about manually editing the script anymore.
// - [Added] Added /createhint.
// - [Added] Added /changehintspawn.
// - [Added] Added /removehint.
// - [Added] Added a define (GH_USE_HOUSESTORAGE) to decide whether you want to use the house storage feature or not.
// - [script] Updated the configuration section of this script. Features are no longer disabled by commenting then out. Simply just change \"true\" to \"false\" if you want to disable a feature.
// - [Added] Added /myhouses - when selecting one of your houses you can decide whether you want to show information about that house or teleport to it (disabled by default).
// - [script] Instead of looping trough all houses and checking if the file exists it now uses foreach for this which should speed up the script a bit.
// - [Changed] 3D text labels are now streamed using the streamer plugin as I finnaly solved the issue with them not drawing.
// - [Changed] Other minor changes around the script.
// - [Removed] Removed the debug printf\'s.
// - [Changed] Decapitalized all words which should not be capitalized all over the script.
// - [Fixed] Fixed some typos which were repeating all over the script.
// - [Added] More dialogs, yay!
// - [script] Script now deletes PVars on filterscript exit to reduce memory usage.
// - [script] IsInHouse \"char\" array for increased speed (compared to checking if a player is in a house using GetPVarInt. However you can still access the IsInHouse PVar in other scripts using GetPVarInt).
// - [Fixed] Last two \"missing\" message macros added to the script.
// - [Added] Added the ability to breakin to houses. There is a 30% chance for successfully breaking into the house and 70% chance of failing. You can disable this feature by setting the GH_ALLOW_BREAKIN define to false.
// - [Added] Added an user management menu to /housemenu. You can kick out players from your house, give players house keys to your house and take away house keys from players.
// - [Added] Players with house keys can enter the house automaticly - just like the house owner. They can not access the house menu though.
// - [Added] Added the ability to \"upgrade\" your house with things like house alarm, security camera, security dog and better houselock. All those \"upgrades\" have their own ability.
// - [Added] Players will gain wanted level when they succeed/fail at breaking into/robbing a house IF the house has either an alarm or a security camera. You can disable this feature by setting the GH_GIVE_WANTEDLEVEL define to false.
// - [Added] Added the ability to rob houses. The player can rob a maximum of X percent of the house storage (25% by default - can be changed in the script). But there is a maximum limit of how much money can be stolen. You can only rob houses if the houseowner is connected.
// - [Added] Players will take X damage from each bite from the security dog of a house when attempting to breakin or rob a house (values can be changed in the script. The default is -25 health points per bite. And the dog bites 3 times).
// - [Added] It will be harder to breakin to your house if you have bought the houselock upgrade. There will be a 90% chance of failing and 10% chance of succeeding.
// - [Added] House owners will be warned when someone is doing a breakin or a robbery in their house (the other players name will stay anonymous unless the house owner has bought the security camera upgrade).
// - [Added] Added automatic ejection from house when the filterscript is unloaded.
// - [Added] Added automatic ejection from house when the current house the player is in gets deleted.
// - [Fixed] Fixed problem with some messagebox dialogs not appearing.
// - [Added] Added feature to set the house interior to the default one if the current one the house uses gets deleted.
//==============================================================================
//                              Includes
//==============================================================================
#define FILTERSCRIPT // Important
#include <a_samp> // Credits to the SA:MP Developement Team
#include <sscanf2> // Credits to Y_Less
#include <YSI\\y_ini> // Credits to Y_Less
#include <ZCMD> // Credits to Zeex
#include <streamer> // Credits to Incognito
#include <foreach> // Credits to Y_Less
//##############################################################################
//                              Do NOT Replace!!!
//##############################################################################
#define INFORMATION_HEADER \"{F6F6F6}GarHouse {00BC00}v2.0 {F6F6F6}by {00BC00}[03]Garsino\"
#define LABELTEXT1 \"House Name: {F6F6F6}%s\\n{00BC00}House Owner: {F6F6F6}No Owner\\n{00BC00}House Value: {F6F6F6}$%d\\n{00BC00}For Sale: {F6F6F6}No\\n{00BC00}House Privacy: {F6F6F6}Closed\\n{00BC00}House ID: {F6F6F6}%d\"
#define LABELTEXT2 \"House Name: {F6F6F6}%s\\n{00BC00}House Owner: {F6F6F6}%s\\n{00BC00}House Value: {F6F6F6}$%d\\n{00BC00}For Sale: {F6F6F6}%s\\n{00BC00}House Privacy: {F6F6F6}%s\\n{00BC00}House ID: {F6F6F6}%d\"
//==============================================================================
//                              Macros
//==============================================================================
new CMDSString[1000], IsInHouse[MAX_PLAYERS char];
#define YesNo(%0) ((%0) == (1)) ? (\"Yes\") : (\"No\")
#define Answer(%0,%1,%2) (%0) == (1) ? (%1) : (%2)
#define IsPlayerInHouse(%0,%1) ((GetPVarInt(%0, \"LastHouseCP\") == (%1)) && (IsInHouse{%0} == (1))) ? (1) : (0)
#define ShowInfoBox(%0,%1,%2) do{CMDSString = \"\"; format(CMDSString, 1000, %1, %2); ShowPlayerDialog(%0, HOUSEMENU-1, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, CMDSString, \"Close\", \"\");}while(FALSE)
#define GameTextEx(%0,%1,%2,%3,%4) do{CMDSString = \"\"; format(CMDSString, 1000, %3, %4); GameTextForPlayer(%0, CMDSString, %1, %2);}while(FALSE)
#define Loop(%0,%1,%2) for(new %0 = %2; %0 < %1; %0++)
#define function%0(%1) forward %0(%1); public %0(%1)
#define TYPE_OUT (0)
#define TYPE_INT (1)
//==============================================================================
//                              Colours
//==============================================================================
#define COLOUR_INFO                     0x00CC33FF
#define COLOUR_SYSTEM                   0xFF0000FF
#define COLOUR_YELLOW                0xFFFF2AFF
#define COLOUR_GREEN                0x00BC00FF
#define COLOUR_DIALOG                   0xF6F6F6AA
//==============================================================================
#define DC_SAMP                     \"{F6F6F6}\"
#define DC_DIALOG                   \"{F6F6F6}\"
#define DC_ERROR                   \"{FF0000}\"
#define DC_ADMIN                   \"{CC00CC}\"
#define DC_INFO                   \"{00BC00}\"
//==============================================================================
//                              Configuration
//==============================================================================
#define MAX_HOUSES                700 // Max houses created
#define MAX_HOUSE_INTERIORS         15 // Max house interiors created
#define MAX_HOUSES_OWNED          3 // Max houses owned per player
#define HOUSEMENU                21700 // Dialog ID
#define FILEPATH                \"/GarHouse/Houses/%d.ini\"
#define HINT_FILEPATH             \"/GarHouse/Interiors/%d.ini\"
#define USERPATH                \"/GarHouse/Users/%s.ini\"
//------------------------------------------------------------------------------
#define GH_USE_MAPICONS          true  // true = use mapicons | false = do not use mapicons
#define GH_USE_CPS                true  // true = use checkpoints | false = use pickups
#define GH_HINTERIOR_UPGRADE       true  // true = allow players to upgrade their house interior | false = do not allow players to upgrade their house interior
#define GH_USE_HOUSESTORAGE       true  // true = allow players to use the house storage | false = do not allow players to use the house storage
#define GH_HOUSECARS            true  // true = enable house cars | false = disable house cars
#define SPAWN_IN_HOUSE             true  // true = players will spawn in their house on their first spawn | false = players will not spawn in their house on their first spawn
#define CASE_SENSETIVE              true  // true = ignore case sensetive in strcmp | false = do not ignore case sensetive in strcmp
#define GH_ALLOW_BREAKIN            true  // true = allow players to breakin to houses | false = do not allow players to breakin to houses
#define GH_GIVE_WANTEDLEVEL         true  // true = increase the players wanted level when they either attempt to breakin/rob a house or they succeed in doing so | false = do not increase the players wanted level when they either attempt to breakin/rob a house or they succeed in doing so
#define GH_ALLOW_HOUSEROBBERY       false // true = allow players to rob houses | false = do not allow players to rob houses
#define GH_SAVE_ADMINWEPS          false // true = save admin weapons (f.ex: minigun, grenades, RPG) | false = do not save admin weapons (f.ex: minigun, grenades, RPG)
#define GH_USE_WEAPONSTORAGE       false // true = allow players to store weapons in their house | false = do not allow players to store weapons in their house
#define GH_ALLOW_HOUSETELEPORT      false // true = allow players to teleport to their house using /myhouses | false = do not allow players to teleport to their house using /myhouses
//------------------------------------------------------------------------------
#define HOUSEFILE_LENGTH            30
#define INTERIORFILE_LENGTH         30
#define MIN_HOUSE_VALUE             100000 // Min house value of a house (ofc prices will change when a house is bought/sold nearby)
#define MAX_HOUSE_VALUE             25000000 // Max house value of a house (ofc prices will change when a house is bought/sold nearby)
#define MIN_HINT_VALUE            10000 // Min house interior value
#define MAX_HINT_VALUE            50000000 // Max house interior value
#define HOUSE_ROBBERY_PERCENT       25 // How many percent of the cash in the house storage will be robbed?
#define MAX_MONEY_ROBBED            500000 // Max money you can rob from a house.
#define HSPAWN_TIMER_RATE         1000 // After how long will the timer call the spawn in house function? (in ms)
#define MICON_VD                500.0 // Map icon visible range (drawdistance).
#define TEXTLABEL_DISTANCE          25.0 // 3D text visible range (drawdistance)
#define TEXTLABEL_TESTLOS          1 // 1 makes the 3D text label visible trough walls.
#define CP_DRAWDISTANCE          25.0 // checkpoint visible range (drawdistance)
#define DEFAULT_H_INTERIOR        0 // Default house interior when creating a house
#define HCAR_COLOUR1             -1 // The first colour of the housecar
#define HCAR_COLOUR2             -1 // The second colour of the housecar
#define HCAR_RESPAWN            60 // The respawn delay of the house car (in seconds)
#define HCAR_RANGE              10.0 // The range to check for nearby vehicles when saving the house car.
#define PICKUP_MODEL_OUT          1273 // Pickup model ID which shows up OUTSIDE the house.
#define PICKUP_MODEL_INT          1272 // Pickup model ID which shows up INSIDE the house.
#define PICKUP_TYPE                 1 // The pickup type if you decide to not use checkpoints
#define MAX_VISIT_TIME              1 // The max time the player can be visiting in (In Minutes).
#define TIME_BETWEEN_VISITS         2 // The time the player have to wait before previewing a new house interior (In minutes).
#define TIME_BETWEEN_BREAKINS       5 // The time the player have to wait before attempting to breakin to a house again (In minutes).
#define TIME_BETWEEN_ROBBERIES      10 // The time the player have to wait before attempting to rob a house again (In minutes).
#define HOUSE_SELLING_PROCENT      75 // The amount of the house value the player will get when the house is sold.
#define HOUSE_SELLING_PROCENT2       6.5 // The total percentage the nearby houses will go up/down by when a house is sold/bought nearby.
#define RANGE_BETWEEN_HOUSES        200 // The range used when increasing/decreasing the value of nearby houses when a house is bought/sold (set to 0 to disable)
#define MAX_HOUSE_NAME              35 // Max length of a house name
#define MIN_HOUSE_NAME              4 // Min length of a house name
#define MAX_HINT_NAME                 35 // Max length of a house interior name
#define MIN_HINT_NAME                 4 // Min length of a house interior name
#define MAX_HOUSE_PASSWORD          35 // Max length of a house password
#define MIN_HOUSE_PASSWORD          4 // Min length of a house password
#define MAX_ZONE_NAME             60 // Max length of a zone name
#define MIN_ROB_TIME                30 // The minimum amount of time the player have to be in the house to be able to rob it (In seconds)
#define MAX_ROB_TIME                60 // The maximum amount of time the player have to be in the house to be able to rob it (In seconds)
#define HUPGRADE_ALARM           10000 // How much the player should pay for the house alarm upgrade.
#define HUPGRADE_CAMERA           25000 // How much the player should pay for the security camera upgrade.
#define HUPGRADE_DOG              35000 // How much the player should pay for the security dog upgrade.
#define HUPGRADE_UPGRADED_HLOCK     40000 // How much the player should pay for the doorlock upgrade.
#define HBREAKIN_WL                 1 // How much should the players wanted level increase by when they fail/succeed at breaking into a house (if the house has a house alarm/security camera).
#define HROBBERY_WL                 3 // How much should the players wanted level increase by when they fail/succeed at robbing a house (if the house has a house alarm/security camera).
#define GH_MAX_WANTED_LEVEL         6 // What is the max wanted level a player can get?
#define SECURITYDOG_HEALTHLOSS       25.00 // How much health should the player lose after each bit?
#define SECURITYDOG_BITS          3 // How many times will the dog bite the player during a breakin/robbery?
#define INVALID_HOWNER_NAME         \"INVALID_PLAYER_ID\" // The \"name\" of the house owner when there is no owner of the house
#define DEFAULT_HOUSE_NAME          \"House For Sale!\" // The default name when a house is created/sold
//------------------------------------------------------------------------------
new Iterator:Houses<MAX_HOUSES>, Text3D:HouseLabel[MAX_HOUSES], Float:X, Float:Y, Float:Z, Float:Angle;
#if GH_USE_CPS == true
new HouseCPOut[MAX_HOUSES], HouseCPInt[MAX_HOUSES];
#else
new HousePickupOut[MAX_HOUSES], HousePickupInt[MAX_HOUSES];
#endif
#if GH_USE_MAPICONS == true
new HouseMIcon[MAX_HOUSES];
#endif
#if GH_HOUSECARS == true
new HCar[MAX_HOUSES];
#endif
enum Data
{
   HousePassword,
   HouseOwner[MAX_PLAYER_NAME],
   HouseName[MAX_HOUSE_NAME],
   HouseLocation[MAX_ZONE_NAME],
   Float:SpawnOutAngle,
   SpawnInterior,
   SpawnWorld,
   Float:CPOutX,
   Float:CPOutY,
   Float:CPOutZ,
   Float:SpawnOutX,
   Float:SpawnOutY,
   Float:SpawnOutZ,
   HouseValue,
   HouseStorage,
   HouseInterior,
   HouseCar,
   HouseCarModel,
   HouseCarWorld,
   HouseCarInterior,
   Float:HouseCarPosX,
   Float:HouseCarPosY,
   Float:HouseCarPosZ,
   Float:HouseCarAngle,
   QuitInHouse,
   Weapon[14],
   Ammo[14],
   ForSale,
   ForSalePrice,
   HousePrivacy,
   HouseAlarm,
   HouseCamera,
   HouseDog,
   UpgradedLock
}
enum hIntData
{
   IntName[30],
   Float:IntSpawnX,
   Float:IntSpawnY,
   Float:IntSpawnZ,
   Float:IntSpawnAngle,
   Float:IntCPX,
   Float:IntCPY,
   Float:IntCPZ,
   IntInterior,
   IntValue
}
new hInfo[MAX_HOUSES][Data], hIntInfo[MAX_HOUSE_INTERIORS][hIntData];
new CurrentID;
//==============================================================================
//                   Translation / SendClientMessage Messages
//==============================================================================
/*
- Below you will find a list of messages.
- You can translate these messages to whatever language you want.
- When updating to a new version, simply replace the messages with the ones you translated.
- But read the note where it says what version the messages below were added for.
   - There might have been some more messages added after this version of GarHouse (v2.0),
- so do not replace all of the messages without looking carefully if there is any new ones.
- And be careful when editing messages containing placeholders (%s, %d, %i, etc),
- if you change the position of these it will screw up eventually.
- and do not remove or add any more placeholders if you do NOT know what you\'re doing.
- Oh and one more thing, I did not translate the dialogs wich uses list items. You will have to do that yourself.
 
Thanks,
[03]Garsino.
*/
/*
            ----------------------------------
              VERSION 2.0 NOTES - IMPORTANT!
            ----------------------------------
              All messages needs to be replaced
*/
//##############################################################################
//                          Messages added in v2.0
//##############################################################################
#define E_NO_HOUSES_OWNED \"{F6F6F6}You do not own any houses.\"
#define I_HMENU \"{F6F6F6}Type /housemenu to access the house menu.\"
#define E_H_ALREADY_OWNED \"{F6F6F6}This house is already owned by someone else.\"
#define E_INVALID_HPASS_LENGTH \"{F6F6F6}Invalid house password length\"
#define E_INVALID_HPASS \"{F6F6F6}Invalid house password. You may not use this house password.\"
#define E_INVALID_HPASS_CHARS \"{F6F6F6}Your house password contains illegal characters ({00BC00}percentage sign {F6F6F6}or {00BC00}~{F6F6F6}).\"
#define E_INVALID_HNAME_LENGTH \"{F6F6F6}Invalid house name length.\"
#define E_INVALID_HNAME_CHARS \"{F6F6F6}Your house name contains illegal characters ({00BC00}percentage sign {F6F6F6}or {00BC00}~{F6F6F6}).\"
#define I_HPASS_NO_CHANGE \"{F6F6F6}Your house password remains the same.\"
#define I_HPASS_REMOVED \"{F6F6F6}The house password for this house has been removed.\"
#define E_NOT_ENOUGH_PMONEY \"{F6F6F6}You do not have that much money.\"
#define E_INVALID_AMOUNT \"{F6F6F6}Invalid amount.\"
#define E_HSTORAGE_L_REACHED \"{F6F6F6}You can not deposit this much money into your house storage. It can only hold up to {00BC00}$25,000,000{F6F6F6}.\"
#define E_NOT_ENOUGH_HSMONEY \"{F6F6F6}You do not have that much money in your house storage.\"
#define E_NO_WEAPONS \"{F6F6F6}You do not have any weapons to store.\"
#define E_NO_HS_WEAPONS \"{F6F6F6}You do not have any weapons in your house storage.\"
#define E_INVALID_HPASS_CHARS2 \"{F6F6F6}The entered house password contains illegal characters ({00BC00}percentage sign {F6F6F6}or {00BC00}~{F6F6F6}).\"
#define E_C_ACCESS_SE_HM \"{F6F6F6}You can not access someone elses house menu.\"
#define E_NOT_IN_HOUSE \"{F6F6F6}You need to be in a house to use this command.\"
#define E_NOT_HOWNER \"{F6F6F6}You need to be the owner of a house to use this command.\"
#define E_HCAR_NOT_IN_VEH \"{F6F6F6}You need to be in a vehicle to add a house car.\"
#define E_INVALID_HID \"{F6F6F6}Invalid house ID. This house ID does not exist.\"
#define E_NO_HCAR \"{F6F6F6}This house ID does not have a house car. Unable to delete.\"
#define E_H_A_F_SALE \"{F6F6F6}This house is already for sale. You can not sell it.\"
#define E_ALREADY_HAVE_HINTERIOR \"{F6F6F6}You already have this house interior.\"
#define E_HINT_WAIT_BEFORE_VISITING \"{F6F6F6}Please wait before visiting a house interior again.\"
#define I_WRONG_HPASS1 \"{F6F6F6}You have failed to enter {00BC00}%s\'s {F6F6F6}house using the password {00BC00}%s{F6F6F6}.\"
#define I_WRONG_HPASS2 \"{00BC00}%s (%d) {F6F6F6}has attempted to enter your house using the password {00BC00}%s{F6F6F6}.\"
#define I_CORRECT_HPASS1 \"{F6F6F6}You have successfully entered {00BC00}%s\'s {F6F6F6}house using the password {00BC00}%s{F6F6F6}.\"
#define I_CORRECT_HPASS2 \"{00BC00}%s (%d) {F6F6F6}has successfully entered your house using the password {00BC00}%s{F6F6F6}!\"
#define E_TOO_MANY_HOUSES \"{F6F6F6}Sorry, but there are already {00BC00}%d {F6F6F6}houses created.\\nDelete one of the current ones or increase the limit in the script.\"
#define I_H_CREATED \"{F6F6F6}House ID {00BC00}%d {F6F6F6}created...\"
#define I_HCAR_EXIST_ALREADY \"{F6F6F6}House ID %d {F6F6F6}already have a house car. Overwriting current one.\"
#define I_HCAR_CREATED \"{F6F6F6}House car for house ID {00BC00}%d {F6F6F6}created...\"
#define I_H_DESTROYED \"{F6F6F6}House ID {00BC00}%d {F6F6F6}destroyed...\"
#define I_HCAR_REMOVED \"{F6F6F6}House car for house ID {00BC00}%d {F6F6F6}removed...\"
#define I_ALLH_DESTROYED \"{F6F6F6}All houses removed. ({00BC00}%d {F6F6F6}in total)\"
#define I_ALLHCAR_REMOVED \"{F6F6F6}All house cars removed. ({00BC00}%d {F6F6F6}in total)\"
#define I_HSPAWN_CHANGED \"{F6F6F6}You have changed the spawnposition and angle for house ID {00BC00}%d{F6F6F6}.\"
#define I_TELEPORT_MSG \"{F6F6F6}You have teleported to house ID {00BC00}%d{F6F6F6}.\"
#define I_H_SOLD \"{F6F6F6}You have sold house ID {00BC00}%d{F6F6F6}...\"
#define I_ALLH_SOLD \"{F6F6F6}All houses on the server has been sold. ({00BC00}%d {F6F6F6}in total)\"
#define I_H_PRICE_CHANGED \"{F6F6F6}The value for house ID {00BC00}%d has been changed to {00BC00}$%d{F6F6F6}.\"
#define I_ALLH_PRICE_CHANGED \"{F6F6F6}You have changed the value of all houses on the server to {00BC00}$%d. ({00BC00}%d {F6F6F6}in total)\"
#define I_HINT_VISIT_OVER \"{F6F6F6}Your visiting time is over.\\nDo you want to buy the house interior {00BC00}%s {F6F6F6}for {00BC00}$%d{F6F6F6}?\"
#define E_INVALID_HCAR_MODEL \"{F6F6F6}Invalid car model. Accepted car models are between {00BC00}400 {F6F6F6}and {00BC00}612.\"
#define I_HCAR_CHANGED \"{F6F6F6}Car model for house ID {00BC00}%d {F6F6F6}changed to {00BC00}%d.\"
#define HMENU_SELL_HOUSE2 \"{F6F6F6}Type in how much you want to sell your house for below:\"
#define HMENU_CANCEL_HOUSE_SALE \"{F6F6F6}Your house is no longer for sale.\"
#define HMENU_HSALE_CANCEL \"{F6F6F6}Click {00BC00}\\\"Remove\\\" {F6F6F6}to cancel the house sale for this house.\"
#define E_H_NOT_FOR_SALE \"{F6F6F6}This house is not for sale.\"
#define E_INVALID_HSELL_AMOUNT \"{F6F6F6}Invalid amount. The price you want to sell your house for can not be higher than {00BC00}$\"#MAX_HOUSE_VALUE\" {F6F6F6}or lower than {00BC00}$\"#MIN_HOUSE_VALUE\"{F6F6F6}.\"
#define I_H_SET_FOR_SALE \"{F6F6F6}You have successfully set your house {00BC00}%s {F6F6F6}for sale for {00BC00}$%d{F6F6F6}.\"
#define HSELL_BUY_DIALOG \"{00BC00}Current House Owner: {F6F6F6}%s\\n{00BC00}Current House Name: {F6F6F6}%s\\n\\nAre You Sure You Want To Buy This House For {00BC00}$%d{F6F6F6}?\"
#define HSELLER_CONNECTED_MSG1 \"{F6F6F6}Your house {00BC00}%s {F6F6F6}has been sold to {00BC00}%s (%d){F6F6F6}.\\n\"
#define HSELLER_CONNECTED_MSG2 \"{00BC00}You receive: {F6F6F6}$%d\\n{00BC00}House Storage: {F6F6F6}$%d\\n{00BC00}House Price: {F6F6F6}$%d\"
#define HSELLER_OFFLINE_MSG1 \"{F6F6F6}Your house {00BC00}%s {F6F6F6}has been sold to {00BC00}%s {F6F6F6}while you were offline.\\n\"
#define HSELLER_OFFLINE_MSG2 \"{00BC00}You receive: {F6F6F6}$%d\\n{00BC00}House Storage: {F6F6F6}$%d\\n{00BC00}House Price: {F6F6F6}$%d\"
#define E_NOT_HOUSECAR_OWNER \"{F6F6F6}You can not drive this vehicle as it belongs to the owner of house ID {F6F6F6}%d which is {F6F6F6}%s.\"
#define I_HOUSECAR_OWNER \"{F6F6F6}Welcome to your vehicle, {00BC00}%s{F6F6F6}! This vehicle belongs to your house (ID {00BC00}%d{F6F6F6}) so therefore only you can drive it.\"
#define I_TO_PLAYERS_HSOLD \"{F6F6F6}This house has been sold.\\nYou have been automaticly kicked out from the house.\"
#define E_INVALID_HINT \"{F6F6F6}Invalid house interior. Accepted house interiors are between {00BC00}0 {F6F6F6}and {00BC00}\"#MAX_HOUSE_INTERIORS\"{F6F6F6}.\"
#define E_CMD_USAGE_CHANGEHINTSPAWN \"Usage:{F6F6F6} /changehintspawn (house interior)\"
#define E_CMD_USAGE_CREATEHINT \"Usage:{F6F6F6} /createhint (value) (name)\"
#define E_CMD_USAGE_REMOVEHINT \"Usage:{F6F6F6} /removehint (house interior)\"
#define E_CMD_USAGE_CREATEHOUSE \"Usage:{F6F6F6} /createhouse (house value) (optional: house interior)\"
#define E_CMD_USAGE_ADDHCAR \"Usage:{F6F6F6} /addhcar (house id)\"
#define E_CMD_USAGE_REMOVEHOUSE \"Usage:{F6F6F6} /removehouse (houseid)\"
#define E_CMD_USAGE_REMOVEHCAR \"Usage:{F6F6F6} /removehcar (house id)\"
#define E_CMD_USAGE_CHANGEHCAR \"Usage:{F6F6F6} /changehcar (house id) (modelid: 400-612)\"
#define E_CMD_USAGE_CHANGESPAWN \"Usage:{F6F6F6} /changespawn (houseid)\"
#define E_CMD_USAGE_GOTOHOUSE \"Usage:{F6F6F6} /gotohouse (houseid)\"
#define E_CMD_USAGE_SELLHOUSE \"Usage:{F6F6F6} /sellhouse (houseid)\"
#define E_CMD_USAGE_CHANGEPRICE \"Usage:{F6F6F6} /changeprice (houseid) (price)\"
#define E_CMD_USAGE_CHANGEALLPRICE \"Usage:{F6F6F6} /changeallprices (price)\"
#define E_INVALID_HINT_ID \"{F6F6F6}Invalid house interior ID.\"
#define I_HINT_SPAWN_CHANGED \"{F6F6F6}You have changed the spawn position and angel for house interior ID %d.\"
#define I_HINT_CREATED \"{F6F6F6}House interior ID {00BC00}%d {F6F6F6}created...\\n{00BC00}House Interior Value: {F6F6F6}$%d\\n{00BC00}House Interior Name: {F6F6F6}%s\"
#define E_TOO_MANY_HINTS \"{F6F6F6}Sorry, but there are already {00BC00}%d {F6F6F6}house interiors created.\\nDelete one of the current ones or increase the limit in the script.\"
#define E_INVALID_HINT_VALUE \"{F6F6F6}Invalid house interior value. The value must be between {00BC00}$\"#MIN_HINT_VALUE\" {F6F6F6}and {00BC00}$\"#MAX_HINT_VALUE\"{F6F6F6}.\"
#define E_INVALID_HINT_LENGTH \"{F6F6F6}Invalid house interior name length. The length must be between {00BC00}\"#MIN_HINT_NAME\" {F6F6F6}and {00BC00}\"#MAX_HINT_NAME\"{F6F6F6}.\"
#define I_HINT_DESTROYED \"{F6F6F6}House interior ID {00BC00}%d {F6F6F6}has been deleted...\"
#define E_NO_HOUSESTORAGE \"{F6F6F6}The house storage feature has been disabled in this server. You can not use it.\"
#define I_HOWNER_HINFO_1 \"{00BC00}House Name: {F6F6F6}%s\\n{00BC00}House Location: {F6F6F6}%s\\n{00BC00}Distance to house from you: {F6F6F6}%0.2f feet\\n\"
#define I_HOWNER_HINFO_2 \"{00BC00}House Value: {F6F6F6}$%d\\n{00BC00}House Storage: {F6F6F6}$%d\\n{00BC00}House Privacy: {F6F6F6}%s\\n{00BC00}House ID: {F6F6F6}%d\"
#define HMENU_ENTER_PASS \"{00BC00}House Name: {F6F6F6}%s\\n{00BC00}House Owner: {F6F6F6}%s\\n{00BC00}House Value: {F6F6F6}$%d\\n{00BC00}House ID: {F6F6F6}%d\\n\\nEnter The Password For The House Below If You Wish To Enter:\"
#define I_HINT_DEPOSIT1 \"{F6F6F6}You have {00BC00}$%d {F6F6F6}in your house storage.\\n\\nType in the amount you want to deposit below:\"
#define I_HINT_WITHDRAW1 \"{F6F6F6}You have {00BC00}$%d {F6F6F6}in your house storage.\\n\\nType in the amount you want to withdraw below:\"
#define I_HINT_DEPOSIT2 \"{F6F6F6}You have successfully deposited {00BC00}$%d {F6F6F6}Into your house storage.\\n{00BC00}Current Balance: {F6F6F6}$%d\"
#define I_HINT_WITHDRAW2 \"{F6F6F6}You have successfully withdrawn {00BC00}$%d {F6F6F6}From your house storage.\\n{00BC00}Current Balance: {F6F6F6}$%d\"
#define I_HINT_CHECKBALANCE \"{F6F6F6}You have {00BC00}$%d {F6F6F6}in your house storage.\"
#define E_HINT_DOESNT_EXIST \"{F6F6F6}Invalid house interior. This house interior does not exist.\"
#define HMENU_BUY_HOUSE \"{F6F6F6}Do you want to buy this house for {00BC00}$%d{F6F6F6}?\"
#define HMENU_BUY_HINTERIOR \"{F6F6F6}Do you want to buy the house interior {00BC00}%s {F6F6F6}for {00BC00}$%d{F6F6F6}?\"
#define HMENU_SELL_HOUSE \"{F6F6F6}Are you sure you want to sell your house {00BC00}%s {F6F6F6}for {00BC00}$%d{F6F6F6}?\"
#define I_SELL_HOUSE1_1 \"{F6F6F6}You have successfully sold your house for {00BC00}$%d\\n\"
#define I_SELL_HOUSE1_2 \"{00BC00}Selling Fee: {F6F6F6}$%d\\nThe {00BC00}$%d {F6F6F6}in your house storage has been transfered to your pocket.\"
#define I_SELL_HOUSE2 \"{F6F6F6}You have successfully sold your house {00BC00}%s {F6F6F6}for {00BC00}$%d.\\n{00BC00}Selling Fee: {F6F6F6}$%d\"
#define I_BUY_HOUSE \"{F6F6F6}You have successfully bought this house for {00BC00}$%d{F6F6F6}!\"
#define I_HPASSWORD_CHANGED \"{F6F6F6}You have successfully set the house password to {00BC00}%s{F6F6F6}!\"
#define I_HNAME_CHANGED \"{F6F6F6}You have successfully set the house name to {00BC00}%s{F6F6F6}!\"
#define I_VISITING_HOUSEINT \"{F6F6F6}You\'re now visiting the house interior {00BC00}%s{F6F6F6}.\\nThis house interior costs {00BC00}$%d{F6F6F6}.\\nYour visit time will end in {00BC00}%d {F6F6F6}minute%s.\"
#define E_CANT_AFFORD_HINT1 \"{F6F6F6}You can not afford to buy the house interior {00BC00}%s{F6F6F6}.\\n{00BC00}House Interior Price: {F6F6F6}$%d\\n\"
#define E_CANT_AFFORD_HINT2 \"{00BC00}You have: {F6F6F6}$%d\\n{00BC00}You Need: {F6F6F6}$%d\"
#define I_HINT_BOUGHT \"{F6F6F6}You have bought the house interior {00BC00}%s {F6F6F6}for {00BC00}$%d.\"
#define I_HS_WEAPONS1 \"{F6F6F6}You have successfully stored {00BC00}%d {F6F6F6}weapon%s in your house storage.\"
#define I_HS_WEAPONS2 \"{F6F6F6}You have successfully received {00BC00}%d {F6F6F6}weapon%s from your house storage.\"
#define E_INVALID_HVALUE \"{F6F6F6}Invalid house value. The house value must be between {00BC00}$\"#MIN_HOUSE_VALUE\" {F6F6F6}and {00BC00}$\"#MAX_HOUSE_VALUE\"{F6F6F6}.\"
#define I_HOPEN_FOR_VISITORS \"{F6F6F6}You have successfully opened your house for visitors.\"
#define I_CLOSED_FOR_VISITORS1 \"{F6F6F6}You have successfully closed your house for visitors.\\n{00BC00}Total visitors kicked out: {F6F6F6}%d\"
#define I_CLOSED_FOR_VISITORS2 \"{00BC00}%s (%d) {F6F6F6}has closed their house for visitors. Automaticly exiting house...\"
#define E_MAX_HOUSES_OWNED \"{F6F6F6}You already own {00BC00}%d {F6F6F6}house%s. Sell one of your others before buying a new.\"
#define E_CANT_AFFORD_HOUSE \"{F6F6F6}You can not afford to buy this house.\\n{00BC00}House Value: {F6F6F6}$%d\\n{00BC00}You Have: {F6F6F6}$%d\\n{00BC00}You Need: {F6F6F6}$%d\"
#define I_SUCCESSFULL_BREAKIN1_1 \"{00BC00}%s (%d) {F6F6F6}has successfully broken into your house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define I_SUCCESSFULL_BREAKIN1_2 \"{F6F6F6}Someone has successfully broken into your house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define I_SUCCESSFULL_BREAKIN2 \"{F6F6F6}You have successfully broken into this house.\\n{00BC00}House Name: {F6F6F6}%s\\n{00BC00}House Owner: {F6F6F6}%s\"
#define E_FAILED_BREAKIN1_1 \"{00BC00}%s (%d) {F6F6F6}has failed to breakin to your house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define E_FAILED_BREAKIN1_2 \"{F6F6F6}Someone has failed to breakin to your house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define E_FAILED_BREAKIN2 \"{F6F6F6}You have failed to breakin to this house.\\n{00BC00}House Name: {F6F6F6}%s\\n{00BC00}House Owner: {F6F6F6}%s\"
#define E_NO_HOUSE_BREAKIN \"{F6F6F6}The breakin feature has been disabled in this server. You can not use it.\"
#define E_KICKED_NOT_IN_HOUSE \"{F6F6F6}This player is not in your house.\"
#define I_KICKED_FROM_HOUSE1 \"{F6F6F6}You have kicked out {00BC00}%s (%d) {F6F6F6}from your house.\"
#define I_KICKED_FROM_HOUSE2 \"{F6F6F6}You have been kicked out from the house by {00BC00}%s (%d){F6F6F6}.\"
#define E_ALREADY_HAVE_HOUSEKEYS \"{F6F6F6}You have already given the house keys for this house to this player.\"
#define I_HOUSEKEYS_RECIEVED_1 \"{F6F6F6}You have given {00BC00}%s (%d) {F6F6F6}house keys to this house.\"
#define I_HOUSEKEYS_RECIEVED_2 \"{F6F6F6}You have been given house keys to {00BC00}%s {F6F6F6}in {00BC00}%s {F6F6F6}by {00BC00}%s (%d){F6F6F6}.\"
#define E_DOESNT_HAVE_HOUSEKEYS \"{F6F6F6}This player does not have the house keys for this house.\"
#define I_HOUSEKEYS_TAKEN_1 \"{F6F6F6}You have taken away {00BC00}%s\'s (%d) {F6F6F6}house keys to this house.\"
#define I_HOUSEKEYS_TAKEN_2 \"{00BC00}%s (%d) {F6F6F6}has taken away the house keys to his house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define E_NONE_IN_HOUSE \"{F6F6F6}There isn\'t anyone in your house.\"
#define E_CANT_ROB_OWN_HOUSE \"{F6F6F6}You can not rob your own house.\"
#define E_ALREADY_HAVE_ALARM \"{F6F6F6}You have already bought a house alarm for this house.\"
#define E_ALREADY_HAVE_CAMERA \"{F6F6F6}You have already bought a security camera for this house.\"
#define E_ALREADY_HAVE_DOG \"{F6F6F6}You have already bought a security dog for this house.\"
#define E_ALREADY_HAVE_UPGRADED_HLOCK \"{F6F6F6}You have already bought a better doorlock for this house.\"
#define E_NOT_ENOUGH_MONEY_ALARM \"{F6F6F6}You do not have enough money to buy a house alarm for your house.\"
#define E_NOT_ENOUGH_MONEY_CAMERA \"{F6F6F6}You do not have enough money to buy a security camera for your house.\"
#define E_NOT_ENOUGH_MONEY_DOG \"{F6F6F6}You do not have enough money to buy a security dog for your house.\"
#define E_NOT_ENOUGH_MONEY_UPGRADED_HLOCK \"{F6F6F6}You do not have enough money to buy a better doorlock for your house.\"
#define I_HUPGRADE_ALARM \"{F6F6F6}You have bought a alarm for your house.\\nThis alarm will warn you when someone tries to or succeed in either robbing or breaking into your house.\\n{00BC00}Note: {F6F6F6}It does not notify you of who it is.\"
#define I_HUPGRADE_CAMERA \"{F6F6F6}You have bought a security camera for your house.\\nThis security camera will warn you when someone tries to or succeed in either robbing or breaking into your house.\\n{00BC00}Note: {F6F6F6}It does notify you of who it is.\"
#define I_HUPGRADE_DOG \"{F6F6F6}You have bought a security dog for your house.\\nThis security dog will try to kill anyone who tries to either rob or breakin to your house.\"
#define I_HUPGRADE_UPGRADED_HLOCK \"{F6F6F6}You have bought upgraded the doorlock for your house.\\nIt will now be harder to breakin to your house.\"
#define E_FAILED_HROB1_1 \"{00BC00}%s (%d) {F6F6F6}has failed to rob your house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define E_FAILED_HROB1_2 \"{F6F6F6}Someone has failed to rob your house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define I_HROB_STARTED1_1 \"{F6F6F6}Someone is currently robbing your house %s {F6F6F6}in %s{F6F6F6}.\"
#define I_HROB_STARTED1_2 \"{00BC00}%s (%d) {F6F6F6}is currently robbing your house %s {F6F6F6}in %s{F6F6F6}.\"
#define I_HROB_STARTED2 \"{F6F6F6}You have started the robbery of {00BC00}%s\'s {F6F6F6}house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\\n\\n{00BC00}Stay alive and do not leave the house until the robbery finishes!\"
#define E_HROB_OWNER_NOT_CONNECTED \"{F6F6F6}You can not rob this house since the owner of it is not connected.\"
#define I_HROB_FAILED_DEATH \"{F6F6F6}You have died.\\nThe attempt to rob the house {00BC00}%s {F6F6F6}has failed.\"
#define I_HROB_FAILED_HEXIT \"{F6F6F6}You have left the house.\\nThe attempt to rob the house {00BC00}%s {F6F6F6}has failed.\"
#define I_HROB_FAILED_NOT_IN_HOUSE \"{F6F6F6}You are not in the house you were attempting to rob.\\nThe attempt to rob the house {00BC00}%s {F6F6F6}has failed.\"
#define E_FAILED_HROB2 \"{F6F6F6}House robbery failed.\"
#define I_HROB_COMPLETED1_1 \"{F6F6F6}Your house {00BC00}%s {F6F6F6}in {00BC00}%s {F6F6F6}has been robbed for {00BC00}$%d{F6F6F6}.\"
#define I_HROB_COMPLETED1_2 \"{00BC00}%s (%d) {F6F6F6}has robbed your house {00BC00}%s {F6F6F6}in {00BC00}%s {F6F6F6}for {00BC00}$%d{F6F6F6}.\"
#define I_HROB_COMPLETED2 \"{F6F6F6}House robbery completed.\\nYou got away with {00BC00}$%d {F6F6F6}from {00BC00}%s\'s {F6F6F6}house {00BC00}%s {F6F6F6}in {00BC00}%s{F6F6F6}.\"
#define HROB_FAILED1 \"{F6F6F6}You have been bit to death by the security dog for this house.\\nRobbery failed.\"
#define HBREAKIN_FAILED1 \"{F6F6F6}You have been bit to death by the security dog for this house.\\nHouse breakin failed.\"
#define E_WAIT_BEFORE_BREAKIN \"{F6F6F6}Please wait before attempting to breakin to a house again.\"
#define E_WAIT_BEFORE_ROBBING \"{F6F6F6}Please wait before attempting to rob a house again.\"
#define E_ALREADY_ROBBING_HOUSE \"{F6F6F6}You are already robbing a house.\"
#define HROB_FAILED2 \"{F6F6F6}House robbery failed.\\nYou have been bit by the security dog for this house.\"
#define HBREAKIN_FAILED2 \"{F6F6F6}House breakin failed.\\nYou have been bit by the security dog for this house.\"
//==============================================================================
//                              Awesomeness
//==============================================================================
public OnFilterScriptInit()
{
    print(\"\\n>> Attempting to load GarHouse v2.0... <<\\n\");
    INI_Load(\"/GarHouse/House.ini\");
    LoadHouses(); // Load houses
    foreach(Player, i)
    {
        SetPVarInt(i, \"HousePrevTime\", 0);
        SetPVarInt(i, \"TimeSinceHouseRobbery\", 0);
       SetPVarInt(i, \"TimeSinceHouseBreakin\", 0);
        SetPVarInt(i, \"HouseRobberyTimer\", -1);
    }
    print(\"\\n>> GarHouse v2.0 By [03]Garsino Loaded <<\\n\");
    return 1;
}
public OnFilterScriptExit()
{
new INI:file, lasthcp;
foreach(Player, i)
{
    EndHouseRobbery(i);
    SetPVarInt(i, \"IsRobbingHouse\", 0);
    lasthcp = GetPVarInt(i, \"LastHouseCP\");
    if(!strcmp(hInfo[lasthcp][HouseOwner], pNick(i), CASE_SENSETIVE) && IsInHouse{i} == 1 && fexist(HouseFile(lasthcp)))
{
           file = INI_Open(HouseFile(lasthcp));
       INI_WriteInt(file, \"QuitInHouse\", 1);
    INI_Close(file);
    #if GH_HOUSECARS == true
          SaveHouseCar(lasthcp);
           #endif
}
ExitHouse(i, lasthcp);
DeletePVars(i);
}
    UnloadHouses(); // Unload houses (also unloads the house cars)
    print(\"\\n>> GarHouse v2.0 By [03]Garsino Unloaded <<\\n\");
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid, \"IsRobbingHouse\") == 1)
{
    ShowInfoBox(playerid, I_HROB_FAILED_DEATH, hInfo[GetPVarInt(playerid, \"LastHouseCP\")][HouseName]);
EndHouseRobbery(playerid);
SetPVarInt(playerid, \"IsRobbingHouse\", 0);
SetPVarInt(playerid, \"TimeSinceHouseRobbery\", GetTickCount());
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, \"IsAnimsPreloaded\") == 0)
{
    ApplyAnimation(playerid, \"CRACK\", \"null\", 0.0, 0, 0, 0, 0, 0);
       SetPVarInt(playerid, \"IsAnimsPreloaded\", 1);
    }
    #if SPAWN_IN_HOUSE == true
    if(GetPVarInt(playerid, \"FirstSpawn\") == 0)
    {
SetTimerEx(\"HouseSpawning\", HSPAWN_TIMER_RATE, false, \"i\", playerid); // Increase timer rate if your gamemodes OnPlayerSpawn gets called after the timer has ended
    }
    #endif
return 1;
}
#if GH_HOUSECARS == true
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
foreach(Houses, h)
{
       if(GetPlayerVehicleID(playerid) == HCar[h])
       {
           switch(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE))
           {
               case 0: ShowInfoBox(playerid, I_HOUSECAR_OWNER, pNick(playerid), h);
               case 1:
               {
                   GetPlayerPos(playerid, X, Y, Z);
                   SetPlayerPos(playerid, (X + 3), Y, Z);
                        ShowInfoBox(playerid, E_NOT_HOUSECAR_OWNER, h, hInfo[h][HouseOwner]);
               }
           }
           break;
       }
    }
}
return 1;
}
#endif
public OnPlayerConnect(playerid)
{
new filename[HOUSEFILE_LENGTH], string1[MAX_PLAYER_NAME], string2[MAX_HOUSE_NAME], _tmpstring[256];
format(filename, sizeof(filename), USERPATH, pNick(playerid));
if(fexist(filename))
{
    new hs = GetPVarInt(playerid, \"GA_TMP_HOUSESTORAGE\"), price = GetPVarInt(playerid, \"GA_TMP_HOUSEFORSALEPRICE\");
    INI_ParseFile(filename, \"LoadUserData\", false, true, playerid, true, false);
    fremove(filename);
GetPVarString(playerid, \"GA_TMP_NEWHOUSEOWNER\", string2, MAX_PLAYER_NAME);
GetPVarString(playerid, \"GA_TMP_HOUSENAME\", string1, MAX_HOUSE_NAME);
CMDSString = \"\";
format(_tmpstring, sizeof(_tmpstring), HSELLER_OFFLINE_MSG1, string1, string2);
strcat(CMDSString, _tmpstring);
format(_tmpstring, sizeof(_tmpstring), HSELLER_OFFLINE_MSG2, (hs + price), hs, price);
strcat(CMDSString, _tmpstring);
ShowInfoBoxEx(playerid, COLOUR_INFO, CMDSString);
DeletePVar(playerid, \"GA_TMP_HOUSESTORAGE\"), DeletePVar(playerid, \"GA_TMP_HOUSEFORSALEPRICE\"), DeletePVar(playerid, \"GA_TMP_NEWHOUSEOWNER\"), DeletePVar(playerid, \"GA_TMP_HOUSENAME\");
}
SetPVarInt(playerid, \"HouseRobberyTimer\", -1);
IsInHouse{playerid} = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new year, month, day, lastvisited[20], lasthcp = GetPVarInt(playerid, \"LastHouseCP\");
EndHouseRobbery(playerid);
    if(!strcmp(hInfo[lasthcp][HouseOwner], pNick(playerid), CASE_SENSETIVE) && IsInHouse{playerid} == 1 && fexist(HouseFile(lasthcp)))
{
    getdate(year, month, day);
    format(lastvisited, sizeof(lastvisited), \"%02d/%02d/%d\", day, month, year);
    new INI:file = INI_Open(HouseFile(lasthcp));
    INI_WriteInt(file, \"QuitInHouse\", 1);
    INI_WriteString(file, \"LastVisited\", lastvisited);
    INI_Close(file);
    #if GH_HOUSECARS == true
       SaveHouseCar(lasthcp);
       UnloadHouseCar(lasthcp);
        #endif
}
IsInHouse{playerid} = 0;
return 1;
}
#if GH_USE_CPS == true
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
    new string[256], tmpstring[50];
    foreach(Houses, h)
{
    if(checkpointid == HouseCPOut[h])
    {
        SetPVarInt(playerid, \"LastHouseCP\", h);
        if(!strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE))
        {
            SetPlayerHouseInterior(playerid, h);
            ShowInfoBoxEx(playerid, COLOUR_INFO, I_HMENU);
            break;
        }
                format(tmpstring, sizeof(tmpstring), \"HouseKeys_%d\", h);
       if(GetPVarInt(playerid, tmpstring) == 1)
       {
           SetPlayerHouseInterior(playerid, h);
           break;
       }
        if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE))
        {
            if(hInfo[h][HousePassword] == udb_hash(\"INVALID_HOUSE_PASSWORD\"))
         {
             switch(hInfo[h][ForSale])
             {
                 case 0: ShowInfoBox(playerid, LABELTEXT2, hInfo[h][HouseName], hInfo[h][HouseOwner], hInfo[h][HouseValue], h);
               case 1:
               {
                   switch(hInfo[h][HousePrivacy])
                   {
                       case 0: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House (Step 1)\\nBreak In\", \"Select\", \"Cancel\");
                     case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House (Step 1)\\nBreak In\\nEnter House\", \"Select\", \"Cancel\");
                  }
               }
            }
            break;
         }
         if(hInfo[h][HousePassword] != udb_hash(\"INVALID_HOUSE_PASSWORD\"))
         {
             switch(hInfo[h][ForSale])
             {
                 case 0:
                 {
                   switch(hInfo[h][HousePrivacy])
                   {
                       case 0: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Enter House Using Password\\nBreak In\", \"Select\", \"Cancel\");
                     case 1: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Enter House Using Password\\nBreak In\\nEnter House\", \"Select\", \"Cancel\");
                  }
               }
                         case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House (Step 1)\\nBreak In\\nEnter House\", \"Select\", \"Cancel\");
               }
               break;
         }
        }
        if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, \"JustCreatedHouse\") == 0)
      {
         format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]);
         ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, \"Buy\", \"Cancel\");
         break;
      }
    }
    if(checkpointid == HouseCPInt[h])
    {
        switch(GetPVarInt(playerid, \"HousePreview\"))
        {
            case 0: ExitHouse(playerid, h);
            #if GH_HINTERIOR_UPGRADE == true
            case 1:
           {
            GetPVarString(playerid, \"HousePrevName\", tmpstring, 50);
            format(string, sizeof(string), HMENU_BUY_HINTERIOR, tmpstring, GetPVarInt(playerid, \"HousePrevValue\"));
            ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, \"Buy\", \"Cancel\");
           }
            #endif
        }
      break;
    }
    }
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetPVarInt(playerid, \"JustCreatedHouse\") == 1)
{
    foreach(Houses, h)
{
    if(checkpointid == HouseCPOut[h])
    {
        DeletePVar(playerid, \"JustCreatedHouse\");
        break;
    }
    }
}
return 1;
}
#else
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
    new string[256], tmpstring[50];
    foreach(Houses, h)
{
    if(pickupid == HousePickupOut[h])
    {
        SetPVarInt(playerid, \"LastHouseCP\", h);
        if(!strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE))
        {
            SetPlayerHouseInterior(playerid, h);
            ShowInfoBoxEx(playerid, COLOUR_INFO, I_HMENU);
            break;
        }
                format(tmpstring, sizeof(tmpstring), \"HouseKeys_%d\", h);
       if(GetPVarInt(playerid, tmpstring) == 1)
       {
           SetPlayerHouseInterior(playerid, h);
           break;
       }
        if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE))
        {
            if(hInfo[h][HousePassword] == udb_hash(\"INVALID_HOUSE_PASSWORD\"))
         {
             switch(hInfo[h][ForSale])
             {
                 case 0: ShowInfoBox(playerid, LABELTEXT2, hInfo[h][HouseName], hInfo[h][HouseOwner], hInfo[h][HouseValue], h);
               case 1:
               {
                   switch(hInfo[h][HousePrivacy])
                   {
                       case 0: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House (Step 1)\\nBreak In\", \"Select\", \"Cancel\");
                     case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House (Step 1)\\nBreak In\\nEnter House\", \"Select\", \"Cancel\");
                  }
               }
            }
            break;
         }
         if(hInfo[h][HousePassword] != udb_hash(\"INVALID_HOUSE_PASSWORD\"))
         {
             switch(hInfo[h][ForSale])
             {
                 case 0:
                 {
                   switch(hInfo[h][HousePrivacy])
                   {
                       case 0: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Enter House Using Password\\nBreak In\", \"Select\", \"Cancel\");
                     case 1: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Enter House Using Password\\nBreak In\\nEnter House\", \"Select\", \"Cancel\");
                  }
               }
                         case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House (Step 1)\\nBreak In\\nEnter House\", \"Select\", \"Cancel\");
               }
               break;
         }
        }
        if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, \"JustCreatedHouse\") == 0)
      {
         format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]);
         ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, \"Buy\", \"Cancel\");
         break;
      }
    }
    if(pickupid == HousePickupInt[h])
    {
        switch(GetPVarInt(playerid, \"HousePreview\"))
        {
            case 0: ExitHouse(playerid, h);
            #if GH_HINTERIOR_UPGRADE == true
            case 1:
           {
            GetPVarString(playerid, \"HousePrevName\", tmpstring, 50);
            format(string, sizeof(string), HMENU_BUY_HINTERIOR, tmpstring, GetPVarInt(playerid, \"HousePrevValue\"));
            ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, \"Buy\", \"Cancel\");
           }
            #endif
        }
      break;
    }
    }
}
return 1;
}
#endif
stock Float:DistanceToPoint(Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2) return Float:floatsqroot(((X2 - X1) * (X2 - X1)) + ((Y2 - Y1) * (Y2 - Y1)) + ((Z2 - Z1) * (Z2 - Z1)));
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[400], _tmpstring[256], INI:file, filename[HOUSEFILE_LENGTH], h = GetPVarInt(playerid, \"LastHouseCP\"), amount = floatround(strval(inputtext));
    format(filename, sizeof(filename), FILEPATH, h);
if(dialogid == HOUSEMENU && response)
{
    switch(listitem)
{
    case 0: ShowPlayerDialog(playerid, HOUSEMENU+19, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Set House For Sale\\nCancel Active House Sale\\nSell House\", \"Select\", \"Cancel\");
    case 1:
   {
      #if GH_USE_HOUSESTORAGE == false
         ShowInfoBoxEx(playerid, COLOUR_INFO, E_NO_HOUSESTORAGE);
      #else
         #if GH_USE_WEAPONSTORAGE == true
            ShowPlayerDialog(playerid, HOUSEMENU+18, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Money Storage\\nWeapon Storage\", \"Select\", \"Cancel\");
         #else
            ShowPlayerDialog(playerid, HOUSEMENU+10, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Deposit Money\\nWithdraw Money\\nCheck Balance\", \"Select\", \"Cancel\");
         #endif
      #endif
   }
   case 2: ShowPlayerDialog(playerid, HOUSEMENU+14, DIALOG_STYLE_INPUT, INFORMATION_HEADER, \"Type In The New House Name Below:\\n\\nPress \'Cancel\' To Cancel\", \"Done\", \"Cancel\");
    case 3: ShowPlayerDialog(playerid, HOUSEMENU+13, DIALOG_STYLE_INPUT, INFORMATION_HEADER, \"Type In The New House Password Below:\\nLeave The Box Empty If You Want To Keep Your Current House Password.\\nPress \'Remove\' To Remove The House Password.\", \"Done\", \"Remove\");
   case 4:
    {
      #if GH_HINTERIOR_UPGRADE == true
          ShowPlayerDialog(playerid, HOUSEMENU+16, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Preview House Interior\\nBuy House Interior\", \"Select\", \"Cancel\");
      #else
                   ShowPlayerDialog(playerid, HOUSEMENU+24, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Open House For Visitors\\nClose House For Visitors\", \"Select\", \"Cancel\");
      #endif
   }
   case 5:
   {
       #if GH_HINTERIOR_UPGRADE == true
         ShowPlayerDialog(playerid, HOUSEMENU+24, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Open House For Visitors\\nClose House For Visitors\", \"Select\", \"Cancel\");
      #else
      new tmpcount = 1, total = (CountPlayersInHouse(h) - 1);
      if(CountPlayersInHouse(h) == 0) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_NONE_IN_HOUSE);
      CMDSString = \"\";
      foreach(Player, i)
      {
          if(!IsPlayerInHouse(i, h)) continue;
          if(playerid == i) continue;
         if(tmpcount == total)
         {
             format(_tmpstring, sizeof(_tmpstring), \"{00BC00}%d.\\t{FFFF2A}%s in %s\", tmpcount, pNick(i), i);
         }
         else format(_tmpstring, sizeof(_tmpstring), \"{00BC00}%d.\\t{FFFF2A}%s (%d)\\n\", tmpcount, pNick(i), i);
         strcat(CMDSString, _tmpstring);
         tmpcount++;
      }
      ShowPlayerDialog(playerid, HOUSEMENU+25, DIALOG_STYLE_LIST, INFORMATION_HEADER, CMDSString, \"Select\", \"Cancel\");
      #endif
   }
   case 6:
   {
       #if GH_HINTERIOR_UPGRADE == true
      new tmpcount = 1, total = (CountPlayersInHouse(h) - 1);
      if(CountPlayersInHouse(h) == 0) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_NONE_IN_HOUSE);
      CMDSString = \"\";
      foreach(Player, i)
      {
          if(!IsPlayerInHouse(i, h)) continue;
          if(playerid == i) continue;
         if(tmpcount == total)
         {
             format(_tmpstring, sizeof(_tmpstring), \"{00BC00}%d.\\t{FFFF2A}%s in %s\", tmpcount, pNick(i), i);
         }
         else format(_tmpstring, sizeof(_tmpstring), \"{00BC00}%d.\\t{FFFF2A}%s (%d)\\n\", tmpcount, pNick(i), i);
         strcat(CMDSString, _tmpstring);
         tmpcount++;
      }
      ShowPlayerDialog(playerid, HOUSEMENU+25, DIALOG_STYLE_LIST, INFORMATION_HEADER, CMDSString, \"Select\", \"Cancel\");
      #else
                   ShowPlayerDialog(playerid, HOUSEMENU+27, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House Alarm\\t\\t$\"#HUPGRADE_ALARM\"\\nBuy Security Camera\\t\\t$\"#HUPGRADE_CAMERA\"\\nBuy House Security Dog\\t$\"#HUPGRADE_DOG\"\\nBuy Better Houselock\\t\\t$\"#HUPGRADE_UPGRADED_HLOCK\"\", \"Select\", \"Cancel\");
      #endif
   }
   case 7: ShowPlayerDialog(playerid, HOUSEMENU+27, DIALOG_STYLE_LIST, INFORMATION_HEADER, \"Buy House Alarm\\t\\t$\"#HUPGRADE_ALARM\"\\nBuy Security Camera\\t\\t$\"#HUPGRADE_CAMERA\"\\nBuy House Security Dog\\t$\"#HUPGRADE_DOG\"\\nBuy Better Houselock\\t\\t$\"#HUPGRADE_UPGRADED_HLOCK\"\", \"Select\", \"Cancel\");
}
return 1;
}
//------------------------------------------------------------------------------
//                               House Sale
//------------------------------------------------------------------------------
if(dialogid == HOUSEMENU+3 && response)
{
if(GetOwnedHouses(playerid) == 0) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_NO_HOUSES_OWNED);
else
{
    new procent = ReturnProcent(hInfo[h][HouseValue], HOUSE_SELLING_PROCENT);
   GivePlayerMoney(playerid, procent);
   if(hInfo[h][HouseStorage] >= 1)
   {
       CMDSString = \"\";
      format(_tmpstring, sizeof(_tmpstring), I_SELL_HOUSE1_1, procent);
      strcat(CMDSString, _tmpstring);
      format(_tmpstring, sizeof(_tmpstring), I_SELL_HOUSE1_2, (hInfo[h][HouseValue] - procent), hInfo[h][HouseStorage]);
      strcat(CMDSString, _tmpstring);
               ShowInfoBoxEx(playerid, COLOUR_INFO, CMDSString);
      GivePlayerMoney(playerid, hInfo[h][HouseStorage]);
   }
   if(hInfo[h][HouseStorage] == 0)
   {
       ShowInfoBox(playerid, I_SELL_HOUSE2, hInfo[h][HouseName], procent, (hInfo[h][HouseValue] - procent));
   }
   format(hInfo[h][HouseName], MAX_HOUSE_NAME, \"%s\", DEFAULT_HOUSE_NAME);
            format(hInfo[h][HouseOwner], MAX_PLAYER_NAME, \"%s\", INVALID_HOWNER_NAME);
    hInfo[h][HousePassword] = udb_hash(\"INVALID_HOUSE_PASSWORD\");
    hInfo[h][HouseStorage] = hInfo[h][HouseAlarm] = hInfo[h][HouseDog] = hInfo[h][HouseCamera] = hInfo[h][upgradedLock] = 0;
    hInfo[h][HouseValue] = ReturnProcent(hInfo[h][HouseValue], HOUSE_SELLING_PROCENT);
   file = INI_Open(filename);
   INI_WriteInt(file, \"HouseValue\", hInfo[h][HouseValue]);
   INI_WriteString(file, \"HouseOwner\", INVALID_HOWNER_NAME);
   INI_WriteInt(file, \"HousePassword\", hInfo[h][HousePassword]);
   INI_WriteString(file, \"HouseName\", DEFAULT_HOUSE_NAME);
   INI_WriteInt(file, \"HouseStorage\", 0);
   INI_Close(file);
   foreach(Houses, h2)
   {
      if(IsHouseInRangeOfHouse(h, h2, RANGE_BETWEEN_HOUSES) && h2 != h)
      {
            hInfo[h2][HouseValue] = (hInfo[h2][HouseValue] - ReturnProcent(hInfo[h2][HouseValue], HOUSE_SELLING_PROCENT2));
            file = INI_Open(HouseFile(h2));
         INI_WriteInt(file, \"HouseValue\", hInfo[h2][HouseValue]);
         INI_Close(file);
                    UpdateHouseText(h2);
      }
   }
   foreach(Player, i)
   {
       if(IsPlayerInHouse(i, h))
       {
           ExitHouse(i, h);
         ShowInfoBoxEx(i, COLOUR_INFO, I_TO_PLAYERS_HSOLD);
       }
   }
   #if GH_USE_MAPICONS == true
      DestroyDynamicMapIcon(HouseMIcon[h]);
      HouseMIcon[h] = CreateDynamicMapIcon(hInfo[h][CPOutX], hInfo[h][CPOutY], hInfo[h][CPOutZ], 31, -1, hInfo[h][spawnWorld], hInfo[h][spawnInterior], -1, MICON_VD);
   #endif
   UpdateHouseText(h);
}
return 1;
}
//------------------------------------------------------------------------------
//                               House Buying
//------------------------------------------------------------------------------
if(dialogid == HOUSEMENU+4)
{
if(response)
{
    new hname[MAX_PLAYER_NAME+9];
   if(GetOwnedHouses(playerid) >= MAX_HOUSES_OWNED) { ShowInfoBox(playerid, E_MAX_HOUSES_OWNED, MAX_HOUSES_OWNED, AddS(MAX_HOUSES_OWNED)); return 1; }
   if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE)) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_H_ALREADY_OWNED);
   if(hInfo[h][HouseValue] > GetPlayerMoney(playerid)) { ShowInfoBox(playerid, E_CANT_AFFORD_HOUSE, hInfo[h][HouseValue], GetPlayerMoney(playerid), (hInfo[h][HouseValue] - GetPlayerMoney(playerid))); return 1; }
   else
   {
       format(hname, sizeof(hname), \"%s\'s House\", pNick(playerid));
       format(hInfo[h][HouseName], sizeof(hname), \"%s\", hname);
       format(hInfo[h][HouseOwner], MAX_PLAYER_NAME, \"%s\", pNick(playerid));
       hInfo[h][HousePassword] = udb_hash(\"INVALID_HOUSE_PASSWORD\");
       hInfo[h][HouseStorage] = 0;
      GivePlayerMoney(playerid, -hInfo[h][HouseValue]);
      file = INI_Open(filename);
      INI_WriteString(file, \"HouseOwner\", pNick(playerid));
      INI_WriteInt(file, \"HousePassword\", hInfo[h][HousePassword]);
      INI_WriteString(file, \"HouseName\", hname);
      INI_WriteInt(file, \"HouseStorage\", 0);
      INI_Close(file);
      ShowInfoBox(playerid, I_BUY_HOUSE, hInfo[h][HouseValue]);
      foreach(Houses, h2)
      {
         if(IsHouseInRangeOfHouse(h, h2, RANGE_BETWEEN_HOUSES) && h2 != h)
         {
             file = INI_Open(HouseFile(h2));
            INI_WriteInt(file, \"HouseValue\", (hInfo[h2][HouseValue] + ReturnProcent(hInfo[h2][HouseValue], HOUSE_SELLING_PROCENT2)));
                        UpdateHouseText(h2);
                        INI_Close(file);
         }
      }
      #if GH_USE_MAPICONS == true
         DestroyDynamicMapIcon(HouseMIcon[h]);
         HouseMIcon[h] = CreateDynamicMapIcon(hInfo[h][CPOutX], hInfo[h][CPOutY], hInfo[h][CPOutZ], 32, -1, hInfo[h][spawnWorld], hInfo[h][spawnInterior], -1, MICON_VD);
      #endif
      UpdateHouseText(h);
   }
}
return 1;
}
//------------------------------------------------------------------------------
//                               House Password
//------------------------------------------------------------------------------
if(dialogid == HOUSEMENU+13)
{
if(response)
{
   if(strlen(inputtext) > MAX_HOUSE_PASSWORD || (strlen(inputtext) < MIN_HOUSE_PASSWORD && strlen(inputtext) >= 1)) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HPASS_LENGTH);
   if(!strcmp(inputtext, \"INVALID_HOUSE_PASSWORD\", CASE_SENSETIVE)) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HPASS);
   if(strfind(inputtext, \"%\", CASE_SENSETIVE) != -1 || strfind(inputtext, \"~\", CASE_SENSETIVE) != -1) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HPASS_CHARS);
   else
   {
       if(strlen(inputtext) >= 1)
       {
           hInfo[h][HousePassword] = udb_hash(inputtext);
           file = INI_Open(filename);
         INI_WriteInt(file, \"HousePassword\", hInfo[h][HousePassword]);
         INI_Close(file);
         ShowInfoBox(playerid, I_HPASSWORD_CHANGED, inputtext);
      }
      else ShowInfoBoxEx(playerid, COLOUR_INFO, I_HPASS_NO_CHANGE);
   }
}
if(!response)
{
    file = INI_Open(filename);
    INI_WriteInt(file, \"HousePassword\", udb_hash(\"INVALID_HOUSE_PASSWORD\"));
    INI_Close(file);
   ShowInfoBoxEx(playerid, COLOUR_INFO, I_HPASS_REMOVED);
}
return 1;
}
//------------------------------------------------------------------------------
//                               House Name
//------------------------------------------------------------------------------
if(dialogid == HOUSEMENU+14)
{
if(response)
{
    if(strfind(inputtext, \"%\", CASE_SENSETIVE) != -1 || strfind(inputtext, \"~\", CASE_SENSETIVE) != -1) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HNAME_CHARS);
   if(strlen(inputtext) < MIN_HOUSE_NAME || strlen(inputtext) > MAX_HOUSE_NAME) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HNAME_LENGTH);
   else
   {
       format(hInfo[h][HouseName], MAX_HOUSE_NAME, \"%s\", inputtext);
       file = INI_Open(filename);
      INI_WriteString(file, \"HouseName\", inputtext);
      INI_Close(file);
      ShowInfoBox(playerid, I_HNAME_CHANGED, inputtext);
                UpdateHouseText(h);
   }
}
return 1;
}
//------------------------------------------------------------------------------
//                       House Interior Upgrade
//------------------------------------------------------------------------------
if(dialogid == HOUSEMENU+15 && response)
{
    new _int = hInfo[h][HouseInterior];
    SetPVarInt(playerid, \"OldHouseInt\", _int);
    Loop(hint, MAX_HOUSE_INTERIORS, 0)
{
    if(hint == listitem)
    {
        SetPVarInt(playerid, \"HousePrevInt\", hint), SetPVarInt(playerid, \"HousePrevValue\", hIntInfo[hint][intValue]), SetPVarString(playerid, \"HousePrevName\", hIntInfo[hint][intName]);
    }
}
if(_int == GetPVarInt(playerid, \"HousePrevInt\")) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_ALREADY_HAVE_HINTERIOR);
else
{
    new hprevvalue = GetPVarInt(playerid, \"HousePrevValue\");
    GetPVarString(playerid, \"HousePrevName\", string, 50);
//------------------------------------------------------------------------------
    switch(GetPVarInt(playerid, \"HouseIntUpgradeMod\"))
    {
      case 1:
      {
          if(GetSecondsBetweenAction(GetPVarInt(playerid, \"HousePrevTime\")) < (TIME_BETWEEN_VISITS * 60000) && GetPVarInt(playerid, \"HousePrevTime\") != 0) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_HINT_WAIT_BEFORE_VISITING);
          SetPVarInt(playerid, \"IsHouseVisiting\", 1);
         SetPVarInt(playerid, \"HousePreview\", 1);
         SetPVarInt(playerid, \"ChangeHouseInt\", 1);
         SetPVarInt(playerid, \"HousePrevTime\", GetTickCount());
         SetPVarInt(playerid, \"HousePrevTimer\", SetTimerEx(\"HouseVisiting\", (MAX_VISIT_TIME * 60000), false, \"i\", playerid));
         ShowInfoBox(playerid, I_VISITING_HOUSEINT, string, hprevvalue, MAX_VISIT_TIME, AddS(MAX_VISIT_TIME));
      }
      case 2:
      {
         if(hprevvalue > GetPlayerMoney(playerid))
         {
             CMDSString = \"\";
            format(_tmpstring, sizeof(_tmpstring), E_CANT_AFFORD_HINT1, string, hprevvalue);
            strcat(CMDSString, _tmpstring);
            format(_tmpstring, sizeof(_tmpstring), E_CANT_AFFORD_HINT2, GetPlayerMoney(playerid), (hprevvalue - GetPlayerMoney(playerid)));
            strcat(CMDSString, _tmpstring);
            ShowInfoBoxEx(playerid, COLOUR_INFO, CMDSString);
         }
         if(hprevvalue <= GetPlayerMoney(playerid))
         {
             GivePlayerMoney(playerid, -hprevvalue);
             SetPVarInt(playerid, \"ChangeHouseInt\", 1);
                    file = INI_Open(filename);
             INI_Close(file);
            ShowInfoBox(playerid, I_HINT_BOUGHT, string, hprevvalue);
         }
      }
   }
//------------------------------------------------------------------------------
   if(GetPVarInt(playerid, \"ChangeHouseInt\") == 1)
    {
     
« Utoljára szerkesztve: 2012. július 29. - 15:14:05 írta siklosikrisz »

Nem elérhető JBauer

  • 1407
    • Profil megtekintése
Garhouse 3.0 Magyarosítás
« Válasz #3 Dátum: 2012. július 29. - 19:22:45 »
0 Show voters
Ez a v2.0

Kovacs_Bela

  • Vendég
Garhouse 3.0 Magyarosítás
« Válasz #4 Dátum: 2012. július 29. - 21:08:34 »
0 Show voters
úúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúr isteeeeeen
am a v2 magyarosítás fentvan a fórumon  :mistrust:

Garhouse 3.0 Magyarosítás
« Válasz #5 Dátum: 2012. július 29. - 21:54:34 »
0 Show voters
Ne úristenezzél -.-\" Már bocs de nem én raktam be aztmondták nekem hogy a v3 van benn és azt másoltam ki szóval tartsd meg magadnak az ilyesmi hozzászólásaidat rendben? És különbenis ne mond már hogy egyszersem tévedtél

Garhouse 3.0 Magyarosítás
« Válasz #6 Dátum: 2012. július 30. - 00:23:08 »
+1 Show voters
Az oké hogy téved az ember, de hogy ennyire bele se néztél....Ottvan az elején hogy GarHouse v2.0 by [03]Garsino!

Garhouse 3.0 Magyarosítás
« Válasz #7 Dátum: 2012. július 30. - 11:45:36 »
0 Show voters
Én az elejét mégcsak megse néztem.. engem az érdekelt hogy azon kivül mivan benne.. 1 kis részt lemagyarosítottam de az én angol tudásommal sohase lennék készen :S

Kovacs_Bela

  • Vendég
Garhouse 3.0 Magyarosítás
« Válasz #8 Dátum: 2012. július 30. - 13:04:00 »
0 Show voters
Idézetet írta: siklosikrisz date=1343591674\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"25094\" data-ipsquote-contentclass=\"forums_Topic
Ne úristenezzél -.-\" Már bocs de nem én raktam be aztmondták nekem hogy a v3 van benn és azt másoltam ki szóval tartsd meg magadnak az ilyesmi hozzászólásaidat rendben? És különbenis ne mond már hogy egyszersem tévedtél
 


Akkor is lefogom írni, mert a véleményemet semmi nem változtatja meg. Csak én.
 
[/quote]
;) zeteni forever xDDDD

Garhouse 3.0 Magyarosítás
« Válasz #9 Dátum: 2012. július 30. - 17:52:39 »
0 Show voters
Esetleg segítesz vagy folytatod a \"veszekedést\" ?

Garhouse 3.0 Magyarosítás
« Válasz #10 Dátum: 2012. július 30. - 18:55:10 »
0 Show voters
Ingyen szerintem ezt neked nagyon senki sem fogja megcsinálni.

Amúgy meg:


Letöltöd a v2-es verziót, és áthelyezed a v3-as verzióba azokat a cuccokat amik egyeznek..


Amik meg nem, azokat átírod magad..Ha tudsz angolul, ha nem akkor meg fordító ( De az nagyon hülyeségeket dobál ki..)

Nem elérhető lusta19

  • 9084
  • £u$taÐi$znó
    • Profil megtekintése
Garhouse 3.0 Magyarosítás
« Válasz #11 Dátum: 2012. július 30. - 21:18:45 »
+1 Show voters

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal