[Include] S32_House v1.0.0 - Create house with just one line! (MySQL, YCMD, sscanf... A lot of functions & features)
#1

Introduction

Hi all
A few moths ago I started making this script but I had a big problems so I stoped developing it!
Now I fixed it and developed it full!

This house system is very useful (I think) because you create house with just one line, also there is a lot of functions and features! I decide to make this because new scripters can easy add houses and they can learn a lot of with this include! I hope you will like it!



Features
  • Creating house with just one line!
  • 52 functions
  • 18 commands
  • 4 callbacks
  • Buying house, selling house, selling house directly to player, locking house, unlocking house, controling house...
  • Renting house, setting rent price, disabling rent, kicking rent user...
  • Storing weapons (3 slots) & taking weapons
  • Storing money & taking money
  • Added house cars, you can store money, weapons, take money and weapons... You don't have to use house cars, ex. you can use house for just one house etc...
  • Added breaking into houses and house alarm, it's really hard to break into the house with alarm is harder
  • Added 15 more functions, 6 new commands and 2 new callbacks
  • Include is now using foreach
  • Now you can easily count your houses
  • If somebody rent your house every one hour you wil recive money from renting, like paying for rent
  • RCON admins can sell house, set price (If it's not buyed) and go to house
  • You can now rob houses
  • Dynamic creating houses

Functions

pawn Код:
/*

 • Function: CreateHouse(Float: EnterX, Float: EnterY, Float: EnterZ, Interior, Float: InteriorX, Float: InteriorY, Float: InteriorZ, Price, VirtualWorld, RentPrice)
 • Data storage: MySQL (G-Stylezzz's plugin)
 • Usage: Creating house, use this in OnGameModeInit or OnFilterScriptInit!
 • Parameters:
        EnterX, EnterY, EnterZ: Coordinates where you can enter house, also on that coordiantes will create pickup and 3D text!
        ExitX, ExitY, ExitZ: Coordinates where you can exit house, this coordinates are coordiantes of interior, you can find interiors on http://weedarr.wikidot.com/interior or https://sampwiki.blast.hk/wiki/InteriorIDs
        Interior: ID od interior you want, see the web page on the parameter above
        Price: Price for buying house
        VirtulWorld: Always increase this because if you have 2 same interior and player are in the (Example one is in his house, second is in his too) they will see themself, It will look that they have same house! (Bad explained :/)
        RentPrice: Price for renting house, when player buy house maximum rent price is 10000 so, if you put it 20000 than he change it, he won't be able to set it again on 20000
 • Example: CreateHouse(-2521.3315,-623.4722,132.7717, 3, 1527.229980,-11.574499,1002.097106, 1000, 0, 5000);

*/



/*

 • Function: GetHouseUser(houseid)
 • Usage: Getting name of user of specific house!
 • Parameters:
        houseid: ID of house that you want to get user (owner)
 • Example: format(string, sizeof(string), "House user of house id %d is %s", houseid, GetHouseUser(houseid));

*/



/*

 • Function: GetHouseRentUser(houseid)
 • Usage: Getting name of rent user of specific house!
 • Parameters:
        houseid: ID of house that you want to get rent user
 • Example: format(string, sizeof(string), "House rent user of house id %d is %s", houseid, GetHouseRentUser(houseid));

*/



/*

 • Function: GetHouseEnterPos(houseid)
 • Usage: Getting the enter position (XYZ) of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter position
 • Example: format(string, sizeof(string), "House enter XYZ of house id %d is %s", houseid, GetHouseEnterPos(houseid));

*/



/*

 • Function: GetHouseExitPos(houseid)
 • Usage: Getting the exit position (XYZ) of specific house!
 • Parameters:
        houseid: ID of house that you want to get exit position
 • Example: format(string, sizeof(string), "House exit XYZ of house id %d is %s", houseid, GetHouseExitPos(houseid));

*/



/*

 • Function: GetHouseEnterX(houseid)
 • Usage: Getting the enter X position of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter X position
 • Example: format(string, sizeof(string), "House enter X of house id %d is %s", houseid, GetHouseEnterX(houseid));

*/



/*

 • Function: GetHouseEnterY(houseid)
 • Usage: Getting the enter Y position of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter Y position
 • Example: format(string, sizeof(string), "House enter Y of house id %d is %s", houseid, GetHouseEnterY(houseid));

*/



/*

 • Function: GetHouseEnterZ(houseid)
 • Usage: Getting the enter Z position of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter Z position
 • Example: format(string, sizeof(string), "House enter Z of house id %d is %s", houseid, GetHouseEnterZ(houseid));

*/



/*

 • Function: GetHouseExitX(houseid)
 • Usage: Getting the enter X position of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter X position
 • Example: format(string, sizeof(string), "House exit X of house id %d is %s", houseid, GetHouseExitX(houseid));

*/



/*

 • Function: GetHouseExitY(houseid)
 • Usage: Getting the enter Y position of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter Y position
 • Example: format(string, sizeof(string), "House exit Y of house id %d is %s", houseid, GetHouseExitY(houseid));

*/



/*

 • Function: GetHouseExitZ(houseid)
 • Usage: Getting the enter Z position of specific house!
 • Parameters:
        houseid: ID of house that you want to get enter Z position
 • Example: format(string, sizeof(string), "House exit Z of house id %d is %s", houseid, GetHouseExitZ(houseid));

*/



/*

 • Function: GetHousePrice(houseid)
 • Usage: Getting the price of specific house!
 • Parameters:
        houseid: ID of house that you want to get price
 • Example: format(string, sizeof(string), "House price of house id %d is %d", houseid, GetHousePrice(houseid));

*/



/*

 • Function: GetHouseInterior(houseid)
 • Usage: Getting the interior of specific house!
 • Parameters:
        houseid: ID of house that you want to get interior
 • Example: format(string, sizeof(string), "House interior of house id %d is %d", houseid, GetHouseInterior(houseid));

*/



/*

 • Function: GetHouseVirtualWorld(houseid)
 • Usage: Getting the virtualworld of specific house!
 • Parameters:
        houseid: ID of house that you want to get virtualworld
 • Example: format(string, sizeof(string), "House virtualworld of house id %d is %d", houseid, GetHouseVirtualWorld(houseid));

*/



/*

 • Function: GetHouseRentPrice(houseid)
 • Usage: Getting the rent price of specific house!
 • Parameters:
        houseid: ID of house that you want to get rent price
 • Example: format(string, sizeof(string), "House rent priceof house id %d is %d", houseid, GetHouseRentPrice(houseid));

*/



/*

 • Function: GetHouseMoney(houseid)
 • Usage: Getting the money (stored money) of specific house!
 • Parameters:
        houseid: ID of house that you want to get money
 • Example: format(string, sizeof(string), "House money of house id %d is %d", houseid, GetHouseMoney(houseid));

*/



/*

 • Function: GetHouseWeaponID1(houseid)
 • Usage: Getting the weapon id 1 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the weapon id 1
 • Example: format(string, sizeof(string), "House weapon id 1 of house id %d is %d", houseid, GetHouseWeaponID1(houseid));

*/



/*

 • Function: GetHouseWeaponID2(houseid)
 • Usage: Getting the weapon id 2 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the weapon id 2
 • Example: format(string, sizeof(string), "House weapon id 2 of house id %d is %d", houseid, GetHouseWeaponID2(houseid));

*/



/*

 • Function: GetHouseWeaponID3(houseid)
 • Usage: Getting the weapon id 3 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the weapon id 3
 • Example: format(string, sizeof(string), "House weapon id 3 of house id %d is %d", houseid, GetHouseWeaponID3(houseid));

*/



/*

 • Function: GetHouseWeaponID1Ammo(houseid)
 • Usage: Getting the weapon id 1 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the weapon id 1 ammo
 • Example: format(string, sizeof(string), "House weapon id 1 ammo of house id %d is %d", houseid, GetHouseWeaponID1Ammo(houseid));

*/



/*

 • Function: GetHouseWeaponID2Ammo(houseid)
 • Usage: Getting the weapon id 2 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the weapon id 2 ammo
 • Example: format(string, sizeof(string), "House weapon id 2 ammo of house id %d is %d", houseid, GetHouseWeaponID2Ammo(houseid));

*/



/*

 • Function: GetHouseWeaponID3Ammo(houseid)
 • Usage: Getting the weapon id 3 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the weapon id 3 ammo
 • Example: format(string, sizeof(string), "House weapon id 3 ammo of house id %d is %d", houseid, GetHouseWeaponID3Ammo(houseid));

*/



/*

 • Function: GetHouseWeaponID1Name(houseid)
 • Usage: Getting the name of weapon id 1 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the name of weapon id 1
 • Example: format(string, sizeof(string), "House name of weapon id 1 of house id %d is %d", houseid, GetHouseWeaponID1Name(houseid));

*/



/*

 • Function: GetHouseWeaponID2Name(houseid)
 • Usage: Getting the name of weapon id 2 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the name of weapon id 2
 • Example: format(string, sizeof(string), "House name of weapon id 2 of house id %d is %d", houseid, GetHouseWeaponID2Name(houseid));

*/



/*

 • Function: GetHouseWeaponID13Name(houseid)
 • Usage: Getting the name of weapon id 3 of specific house!
 • Parameters:
        houseid: ID of house that you want to get the name of weapon id 3
 • Example: format(string, sizeof(string), "House name of weapon id 3 of house id %d is %d", houseid, GetHouseWeaponID3Name(houseid));

*/



/*

 • Function: IsHouseOwned(houseid)
 • Usage: Checking if is house owned of specific house!
 • Parameters:
        houseid: ID of house that you want to check if is owned
 • Example: if(IsHouseOwned(houseid)) return SendClientMessage(playerid, -1, "House is owned!");
            else SendClientMessage(playerid, -1, "House is not owned!");

*/



/*

 • Function: IsHouseLocked(houseid)
 • Usage: Checking if is house locked of specific house!
 • Parameters:
        houseid: ID of house that you want to check if is locked
 • Example: if(IsHouseLocked(houseid)) return SendClientMessage(playerid, -1, "House is locked!");
            else SendClientMessage(playerid, -1, "House is not locked!");

*/



/*

 • Function: IsHouseRented(houseid)
 • Usage: Checking if is house owned of specific house!
 • Parameters:
        houseid: ID of house that you want to check if is rented
 • Example: if(IsHouseRented(houseid)) return SendClientMessage(playerid, -1, "House is rented!");
            else SendClientMessage(playerid, -1, "House is not rented!");

*/



/*

 • Function: IsHouseRentDisabled(houseid)
 • Usage: Checking if is house owned of specific house!
 • Parameters:
        houseid: ID of house that you want to check if is rent disabled
 • Example: if(IsHouseRentDisabled(houseid)) return SendClientMessage(playerid, -1, "House rent is disabled!");
            else SendClientMessage(playerid, -1, "House rent is not disabled!");

*/



/*

 • Function: IsPlayerHouseOwner(playerid, houseid)
 • Usage: Checking if is player owner of specific house!
 • Parameters:
        playerid: ID of player that you want preform check
        houseid: ID of house that you want to check if is player owner
 • Example: if(IsPlayerHouseOwner(playerid, houseid)) return SendClientMessage(playerid, -1, "You are owner of the house!");
            else SendClientMessage(playerid, -1, "You are not owner of the house!");

*/



/*

 • Function: IsPlayerBuyAnyHouse(playerid)
 • Usage: Checking if is player buyed house and he is owner of any house (used when you try to rent room but you already have house)!
 • Parameters:
        playerid: ID of player that you want preform check
 • Example: if(IsPlayerBuyAnyHouse(playerid)) return SendClientMessage(playerid, -1, "You have house already!");
            else SendClientMessage(playerid, -1, "You don't have house!");

*/



/*

 • Function: IsPlayerRentAnyHouse(playerid)
 • Usage: Checking if is player rented house and he is rent user of any house (used when you try to rent room but you already rented some house)!
 • Parameters:
        playerid: ID of player that you want preform check
 • Example: if(IsPlayerRentAnyHouse(playerid)) return SendClientMessage(playerid, -1, "You rent house already!");
            else SendClientMessage(playerid, -1, "You don't rent house!");

*/



/*

 • Function: IsPlayerBuyHouse(playerid, houseid)
 • Usage: Checking if is player rented house and he is rent user of any house (used when you try to rent room but you already rented some house)!
 • Parameters:
        playerid: ID of player that you want preform check
        houseid: ID of house that you want to check if is player buy house
 • Example: if(IsPlayerBuyHouse(playerid, houseid)) return SendClientMessage(playerid, -1, "You buy this house already!");
            else SendClientMessage(playerid, -1, "You didn't buy rent this house!");

*/



/*

 • Function: IsPlayerRentHouse(playerid, houseid)
 • Usage: Checking if is player rented house and he is rent user of any house (used when you try to rent room but you already rented some house)!
 • Parameters:
        playerid: ID of player that you want preform check
        houseid: ID of house that you want to check if is player rented user
 • Example: if(IsPlayerRentAnyHouse(playerid, houseid)) return SendClientMessage(playerid, -1, "You rent this house already!");
            else SendClientMessage(playerid, -1, "You don't rent this house!");

*/



/*

 • Function: IsHouseExist(houseid)
 • Usage: Checking if is player rented house and he is rent user of any house (used when you try to rent room but you already rented some house)!
 • Parameters:
        houseid: ID of house that you want to check if is exist
 • Example: if(IsHouseExist(houseid)) return SendClientMessage(playerid, -1, "House exist!");
            else SendClientMessage(playerid, -1, "House doesn't exist!");

*/



/*

 • Function: IsPlayerHouseRentUser(playerid, houseid)
 • Usage: Checking if is player rent user of specific house!
 • Parameters:
        playerid: ID of player that you want preform check
        houseid: ID of house that you want to check if is player rent user
 • Example: if(IsPlayerHouseRentUser(playerid, houseid)) return SendClientMessage(playerid, -1, "You are rent user of the house!");
            else SendClientMessage(playerid, -1, "You are not rent user of the house!");

*/



/*

 • Function: IsHouseWeaponSlotFree(houseid, slot)
 • Usage: Checking if is slot free in stored weapons of specific house!
 • Parameters:
        houseid: ID of house that you want to check if is slot free
        slot: Slot of stored weapons from 1-3!
 • Example: if(IsHouseWeaponSlotFree(houseid, 1)) return SendClientMessage(playerid, -1, "Slot 1 is free!");
            else SendClientMessage(playerid, -1, "Slot 1 is not free!");

*/


/*

 • Function: SpawnPlayerAtHouse(playerid)
 • Usage: Spawning player at his house, use this in OnPlayerSpawn!
 • Parameters:
        playerid: ID of player that you want to spawn!
 • Example: SpawnPlayerAtHouse(playerid);

*/


/*

 • Function: GetTotalHouses(playerid, houseid)
 • Usage: Getting all houses, easiser than counting line etc.! Use this in OnGameModeInit after all houses!
 • Example: printf("Total houses: %d", GetTotalHouses());

*/


/*

 • Function: IsHouseHaveAlarm(houseid)
 • Usage: Checking if is house have an alarm!
 • Parameters:
        houseid: ID of house that you want to check if it have an alarm
 • Example: if(IsHouseHaveAlarm(houseid)) return SendClientMessage(playerid, -1, "House have an alarm!");
            else SendClientMessage(playerid, -1, "House doesn't have an alarm!");

*/


/*

 • Function: GetHouseCarID(houseid)
 • Usage: Getting vehicle ID of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle ID
 • Example: format(string, sizeof(string), "Vehicle ID of House ID %d: %d", houseid, GetHouseCar(houseid));

*/


/*

 • Function: GetHouseCarPos(houseid)
 • Usage: Getting vehicle pos of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle pos
 • Example: format(string, sizeof(string), "Vehicle pos of House ID %d: %s", houseid, GetHouseCarPos(houseid));

*/


/*

 • Function: GetHouseCarAngle(houseid)
 • Usage: Getting vehicle angle of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle angle
 • Example: format(string, sizeof(string), "Vehicle angle of House ID %d: %s", houseid, GetHouseCarAngle(houseid));

*/


/*

 • Function: GetHouseCarColor1(houseid)
 • Usage: Getting vehicle color 1 of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle color 1
 • Example: format(string, sizeof(string), "Vehicle color 1 of House ID %d: %d", houseid, GetHouseCarColor1(houseid));

*/


/*

 • Function: GetHouseCarColor2(houseid)
 • Usage: Getting vehicle color 2 of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle color 2
 • Example: format(string, sizeof(string), "Vehicle color 2 of House ID %d: %d", houseid, GetHouseCarColor2(houseid));

*/


/*

 • Function: GetHouseCarWeaponID1(houseid)
 • Usage: Getting weapon id 1 of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle weapon id 1
 • Example: format(string, sizeof(string), "Vehicle weapon id 1 of House ID %d: %d", houseid, GetHouseCarWeaponID1(houseid));

*/


/*

 • Function: GetHouseCarWeaponID2(houseid)
 • Usage: Getting weapon id 2 of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle weapon id 2
 • Example: format(string, sizeof(string), "Vehicle weapon id 2 of House ID %d: %d", houseid, GetHouseCarWeaponID2(houseid));

*/


/*

 • Function: GetHouseCarWeaponID1Ammo(houseid)
 • Usage: Getting weapon id 1 ammo of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle weapon id 1 ammo
 • Example: format(string, sizeof(string), "Vehicle weapon id 1 ammo of House ID %d: %d", houseid, GetHouseCarWeaponID1Ammo(houseid));

*/


/*

 • Function: GetHouseCarWeaponID2Ammo(houseid)
 • Usage: Getting weapon id 2 ammo of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle weapon id 2 ammo
 • Example: format(string, sizeof(string), "Vehicle weapon id 2 ammo of House ID %d: %d", houseid, GetHouseCarWeaponID2Ammo(houseid));

*/


/*

 • Function: GetHouseCarWeaponID1Name(houseid)
 • Usage: Getting name of weapon id 1 of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle name of weapon id 1
 • Example: format(string, sizeof(string), "Vehicle weapon id 1 name of House ID %d: %s", houseid, GetHouseCarWeaponID1Name(houseid));

*/


/*

 • Function: GetHouseCarWeaponID2Name(houseid)
 • Usage: Getting name of weapon id 2 of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle name of weapon id 2
 • Example: format(string, sizeof(string), "Vehicle weapon id 2 name of House ID %d: %s", houseid, GetHouseCarWeaponID2Name(houseid));

*/


/*

 • Function: GetHouseCarMoney(houseid)
 • Usage: Getting money of house car
 • Parameters:
        houseid: ID of house that you want to get vehicle money
 • Example: format(string, sizeof(string), "Vehicle money of House ID %d: %d", houseid, GetHouseCarMoney(houseid));

*/


/*

 • Function: IsHouseCarLocked(houseid)
 • Usage: Checking if is hosue car locked
 • Parameters:
        houseid: ID of house that you want to check if is house car locked
 • Example: if(IsHouseCarLocked(houseid)) SendClientMessae(playerid, -1, "House car is locked!");
            else SendClientMessage(playerid, -1, "House car is not locked!");

*/

Commands

pawn Код:
/*

 • Command: /buyhouse
 • Processor: y_commands (YCMD)
 • Usage: Buying house (Player must be in range of house he want to buy!)

*/


/*

 • Command: /sellhouse
 • Processor: y_commands (YCMD)
 • Usage: Selling house (Player must be in range of house he want to sell!)

*/


/*

 • Command: /sellhouseto
 • Processor: y_commands (YCMD)
 • Usage: Selling house to other player (must be near you!)
 • Parameters:
        id: The id of player you want to sell house

*/


/*

 • Command: /lockhouse
 • Processor: y_commands (YCMD)
 • Usage: Locking house (Player must be in range of his house to lock it!)

*/


/*

 • Command: /unlockhouse
 • Processor: y_commands (YCMD)
 • Usage: Unlocking house (Player must be in range of his house to unlock it!)

*/


/*

 • Command: /rentroom
 • Processor: y_commands (YCMD)
 • Usage: Renting room (house) (Player must be in range of house that he want to rent it!)

*/


/*

 • Command: /stoprent
 • Processor: y_commands (YCMD)
 • Usage: Stop renting room (house) (Player must be in range of his rented house to stop renting it!)

*/


/*

 • Command: /housecontrol
 • Processor: y_commands (YCMD)
 • Usage: Controling your house: lock house, unlock house, set rent price, storing weapons in house, taking weapons from house, storing money in house, taking money from house & kicking rented user from house (Player must be in his house to control it!)

*/


/*

 • Command: /houseinfo
 • Processor: y_commands (YCMD)
 • Usage: Getting stats of your house, is locked, unlocked blabalba

*/


/*

 • Command: /breaklock
 • Processor: y_commands (YCMD)
 • Usage: Breaking lock of house

*/


/*

 • Command: /robhouse
 • Processor: y_commands (YCMD)
 • Usage: Controling your house: lock house, unlock house, set rent price, storing weapons in house, taking weapons from house, storing money in house, taking money from house & kicking rented user from house (Player must be in his house to control it!)

*/


/*

 • Command: /createhouse (RCON Admins only)
 • Processor: y_commands (YCMD)
 • Usage: Creating house at your position

*/


/*

 • Command: /createhouse (RCON Admins only)
 • Processor: y_commands (YCMD)
 • Usage: Creating house at your position

*/


/*

 • Command: /asellhouse (RCON Admins only)
 • Processor: y_commands (YCMD)
 • Usage: Selling specific house
 • Parameters:
        houseid: you don't need to be in range of house, just type ID of house that you want to sell!

*/


/*

 • Command: /asetprice (RCON Admins only)
 • Processor: y_commands (YCMD)
 • Usage: Setting price of specific house
 • Parameters:
        houseid: you don't need to be in range of house, just type ID of house that you want to sell!
        price: price that you want to set

*/


/*

 • Command: /agotohouse (RCON Admins only)
 • Processor: y_commands (YCMD)
 • Usage: Teleporting to a specific house
 • Parameters:
        houseid: you don't need to be in range of house, just type ID of house that you want to go!

*/


/*

 • Command: /lockhousecar
 • Processor: y_commands (YCMD)
 • Usage: Locking your house car

*/


/*

 • Command: /unlockhousecar
 • Processor: y_commands (YCMD)
 • Usage: Unlocking your house car

*/


/*

 • Command: /housecarcontrol
 • Processor: y_commands (YCMD)
 • Usage: Controling your house car: lock house car, unlock house car, storing weapons in house car, taking weapons from house car, storing money in house car, taking money from house car (Player must be in his house car to control it!)

*/

Callbacks

pawn Код:
/*

 • Callback: OnPlayerEnterHouse(playerid, houseid)
 • Action: Called when player enter house!
 • Example: if(IsPlayerHouseOwner(playerid, houseid) SendClientMessage(playerid, -1, "You entered your house!");

*/


/*

 • Callback: OnPlayerExitHouse(playerid, houseid)
 • Action: Called when player exit house!
 • Example: if(IsPlayerHouseOwner(playerid, houseid) SendClientMessage(playerid, -1, "You exited your house!");

*/


/*

 • Callback: OnPlayerEnterHouseVehicle(playerid)
 • Action: Called when player enter house car!
 • Example: SendClientMessage(playerid, -1, "You entered house car!");

*/


/*

 • Callback: OnPlayerExitHouseVehicle(playerid)
 • Action: Called when player exit house car!
 • Example: SendClientMessage(playerid, -1, "You exited house car!");

*/

Necessary things

MySQL Plugin by G-Stylezz aka BlueG
y_hooks by ******
y_commands by ******
sscanf by ******
foreach by ******



Notes
  • When you create house and then change his coordiantes of example: enter coordinates you must delete that house from the database first!
  • When storing weapons it doesn't take your weapon and you can't store some guns, that's not mine problem, it's SA:MP problem!
  • More functions and things will come later!
  • If you find any bug report if as fast as you can!
  • When you install new database of v1.5.0 please delete database of v1.0.0 and than import the new one
  • You don't have to delete houses from gamemode if you use v1.5.0 just do step above
  • Dynamic creating houses is not like other dynamic house system, this is just a preview of a house so when you /createhouse house won't be still here when you do /gmx and you can't buy it, sell etc.
  • Every one hour you can rob house!
  • /edithouse is just for houses that are created with /createhouse!

Video

Thanks god it's uploaded!
[ame]http://www.youtube.com/watch?v=JXBNi1oTlkM[/ame]


Updates

First update (v1.5.0)
  • Added house cars, you can store money, weapons, take money and weapons... You don't have to use house cars, ex. you can use house for just one house etc...
  • Added breaking into houses and house alarm, it's really hard to break into the house with alarm is harder
  • Added 15 more functions, 6 new commands and 2 new callbacks
  • Include is now using foreach
  • Now you can easily count your houses with GetTotalHouses(), use this in OnGameModeInit after all houses
Second update (v2.0.0)
  • You can now rob houses
  • Dynamic creating houses
  • 3 new commands

Download

Pastebin (v2.0.0)


Mediafire (v2.0.0)


Solidfiles (v2.0.0)



Pastebin (v1.5.0)



Pastebin (v1.0.0)




Credits
  • System32 - Almost everything!
  • The Guy - Helped me a lot, thank you!
  • ****** - y_hooks, y_commands, sscanf & foreach!
  • G-Stylezz (BlueG) - MySQL plugin!
  • Some guy on forums like wups, ****** - helped me with some things!
Reply
#2

pretty, nice keep it up.
Reply
#3

awesome i will use it for sure for my stunt
Reply
#4

Functions & Callbacks look nice, will say good job when the video will be up ;]
Reply
#5

Nice work.
Reply
#6

thanks guys^^
Glad to see that you like it!

I'll update this when I finish my admin script, I'll add more functions etc. also maybe I do something like breaking lock of the doors and maybe house robbery
Reply
#7

This is pretty cool. Great job man.
Reply
#8

Quote:

When storing weapons it doesn't take your weapon and you can't store some guns, that's not mine problem, it's SA:MP problem!

Actually its not SA-MP problem, It does take away your weapon, most of roleplay servers with housing system have that.
Reply
#9

Quote:
Originally Posted by iNorton
Посмотреть сообщение
Actually its not SA-MP problem, It does take away your weapon, most of roleplay servers with housing system have that.
What you want to say? You mean something I've done bad?
Reply
#10

Quote:
Originally Posted by System64
Посмотреть сообщение
What you want to say? You mean something I've done bad?
No, I am saying that it is possible to make the weapons go away, you either have done minor scripting problem that it does not take weapons away when player store their firearm in the house.
Reply
#11

Quote:
Originally Posted by iNorton
Посмотреть сообщение
No, I am saying that it is possible to make the weapons go away, you either have done minor scripting problem that it does not take weapons away when player store their firearm in the house.
Oh that, I tried to set ammo on 0 but doesn't work
ex. GivePlayerWeapon(playerid, HouseInfo[i][hWeaponID1], 0); but doesn't work, I stil have weapon :S
Reply
#12

Good job. Functions are awesome , keep it up.
Reply
#13

Nice one! :P
Will definately use it!
Reply
#14

pawn Код:
HQuery[3000], HouseID, hsavingstring[4000],
oh my god...
Reply
#15

Thanks all

@Matt: Thanky you, fala brate Ak nisi znao ja sam Systemko tvoj haahha xD

Quote:
Originally Posted by Kar
Посмотреть сообщение
pawn Код:
HQuery[3000], HouseID, hsavingstring[4000],
oh my god...
Oh my god xD, that was just for testing, I mean, I just increase that when I had that big problem (maybe that was a problem but it isn't) and I forgot to decrease it
Just decrease that
Reply
#16

Quote:
Originally Posted by System64
Посмотреть сообщение
Thanks all
@Matt: Thanky you, fala brate Ak nisi znao ja sam Systemko tvoj haahha xD
t
I know that you are Systemko
Reply
#17

nice jooob....we need more updates with more cool thing's in it !
Reply
#18

hh tnx, Matt: hahahaha

For 2-3 days will come new version, support more ouses by one user and more functions
Reply
#19

i buy house, and i go /rentroom and i can rent in my own house... plss fix it..

i goo to house and i type command for control house, i get dialog i lock my house, and i can exit house..
Reply
#20

loool of course you can't rent your own house, are you crazy?
Question: When you lock doors of your hous (In real life) can you exit it before you unlock it? No
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)