Tomaat Posted August 9, 2012 Share Posted August 9, 2012 How much times does it take rental? Month, week, day ?And please make them able to sell their houses for an amount they can specify Regards, Tomaat Several days Cant you do, When player entered a house, take playername, and house id and compare name to ownername, when is same he can use the f5 panel in the dimension (aka, the same as the house id) and when he leaves house, then disable the f5 panel, maybe by using the command /out the same as disable panel command? Good luck, I do not do it because you can do it too, and other players do not want this. Im Sorry - None Well im a noob at scripting, so i cant i dont really need it, i like it how it is now ^^ it was just an idea how to let it work And can i change the "Several days" somewhere? btw, i love your housesystem Regards, Tomaat Link to comment
nick13 Posted August 11, 2012 Share Posted August 11, 2012 i am having trouble starting the script plz help Link to comment
Timoow13 Posted September 13, 2012 Share Posted September 13, 2012 I don't have that dbs_housesystem.sql file in the folder. And when i try to start the resource, it says: dbConnect failed; unkown database 'dbs_housesystem2' [HOUSESYSTEM]MySQL handler 1 not accepted! Trying secondary handler... dbConnect failed; unkown database 'dbs_housesystem' [HOUSESYSTEM]MySQL handler 1 not accepted! Shutting down... Link to comment
iFoReX Posted September 19, 2012 Share Posted September 19, 2012 I created the databases in phpmyadmin with XAMPP. but I have this problems : [2012-09-19 19:53:43] start: Requested by #CACACAKrl#00fbffooZ(ElMota) [2012-09-19 19:53:43] Starting casas [2012-09-19 19:53:43] [HOUSESYSTEM]MySQL handler 1 accepted! [2012-09-19 19:53:43] WARNING: casas\server.lua:543: (null) failed; Table 'dbs_housesystem2.houses' doesn't exist [2012-09-19 19:53:43] ERROR: casas\server.lua:564: Houses Table not Found\empty! [2012-09-19 19:55:03] WARNING: casas\server.lua:686: (null) failed; Table 'dbs_housesystem2.houses' doesn't exist [2012-09-19 19:55:03] ERROR: casas\server.lua:697: House 1 could not create! Link to comment
Tomaat Posted November 7, 2012 Share Posted November 7, 2012 I created the databases in phpmyadmin with XAMPP. but I have this problems : [2012-09-19 19:53:43] start: Requested by #CACACAKrl#00fbffooZ(ElMota) [2012-09-19 19:53:43] Starting casas [2012-09-19 19:53:43] [HOUSESYSTEM]MySQL handler 1 accepted! [2012-09-19 19:53:43] WARNING: casas\server.lua:543: (null) failed; Table 'dbs_housesystem2.houses' doesn't exist [2012-09-19 19:53:43] ERROR: casas\server.lua:564: Houses Table not Found\empty! [2012-09-19 19:55:03] WARNING: casas\server.lua:686: (null) failed; Table 'dbs_housesystem2.houses' doesn't exist [2012-09-19 19:55:03] ERROR: casas\server.lua:697: House 1 could not create! create a houses table in your database, or execute the sql tables supplied with the script -Tomaat Link to comment
xXMADEXx Posted November 13, 2012 Share Posted November 13, 2012 Very nice, keep up the good work. Link to comment
royhayek Posted November 24, 2012 Share Posted November 24, 2012 http://prntscr.com/khnyg help please im getting this errors Link to comment
Baseplate Posted November 25, 2012 Share Posted November 25, 2012 You didn't execute the SQL file Link to comment
Sande Posted December 27, 2012 Share Posted December 27, 2012 BUG: if you change the name of another player who owns the house can then sell the house. Link to comment
ShadoX<~ Posted April 30, 2013 Share Posted April 30, 2013 I create a MySQL database in my web server but dont work How can I execute SQL files ? Link to comment
Noneatme Posted July 7, 2013 Author Share Posted July 7, 2013 Yep I failed something. A user uploaded a new version of the database in this topic. Link to comment
SjoerdPSV Posted July 7, 2013 Share Posted July 7, 2013 Yep I failed something.A user uploaded a new version of the database in this topic. I can't find it. Link to comment
PhantomNL Posted July 9, 2013 Share Posted July 9, 2013 It's so cool how you can enter the house but not leave the house. Link to comment
MoeezKhan Posted February 3, 2014 Share Posted February 3, 2014 it not working when i press start script not start Link to comment
Hell-Mate Posted March 2, 2014 Share Posted March 2, 2014 Great job Noneatme but its a little bit hard for newbies to install this script as it requires a LUA and MYSQl experiance and also MYSQl data base . Link to comment
J.S. Posted March 5, 2014 Share Posted March 5, 2014 Looks pretty solid. Full featured, and it uses SQL which is a much more efficient way to store data than XML. The grammar issues are a bit distracting though, but since you acknowledge that yourself I hope you take this as more helpful than critical: - The dollar sign ($) always comes before the numbers ($10,000 rather than 10,000$) - Some words are combined that don't need to be ("Rental price", "House menu") - In "This House is locked/unlocked", house doesn't need to be capitalized Other than that it seems pretty good, certainly an improvement over other interior systems that are available on the community. Link to comment
DuaLVII Posted June 5, 2014 Share Posted June 5, 2014 Hey Guys, I only just started server modding yesterday and tried this out, While I got it to work I noticed that there is no house exits and also found others have the same issue. I've done a fix on this and so here it is; Backup your original copies to be safe (Just in-case but this should work) housesystem_mysql :: server.lua - Copy and replace you current script; -- MySQL Housesystem created & released by Noneatme(MuLTi), Do not remove credits! -- -- All Rights go to Noneatme -- --[[ Total time token: - 3 hour - 1.5 hour ________ 4.5 hours ]] ------------------------ -- CONNECTION HANDLER -- ------------------------ -- Here you can change some settings -- -- FIRST CONNECTION -- local mysqlhost1 = "hostname" local mysqluser1 = "dbusername" local mysqlpassword1 = "dbpass" local mysqldatabase1 = "dbtable" -- SECOND CONNECTION, OPTIONAL IF CONNECTION 1 DON'T WORK local mysqlhost2 = "hostname" local mysqluser2 = "dbusername" local mysqlpassword2 = "dbpass" local mysqldatabase2 = "dbtable" local dbpTime = 500 -- How many Miliseconds will use the dbPoll function for waiting for a result local max_player_houses = 3 -- Define the buyable houses per player local sellhouse_value = 80 -- The ammount in percent that you get back if you sell a house local open_key = "F6" -- Define the key for the infomenue and the housepanel -- I don't know whats the right time for that -- ----------------------------------------------------------------- -- IF YOU CAN'T WRITE IN LUA, DO NOT EDIT ANYTHING ABOVE HERE! -- ----------------------------------------------------------------- -- EVENTS -- addEvent("onHouseSystemHouseCreate", true) addEvent("onHouseSystemHouseLock", true) addEvent("onHouseSystemHouseDeposit", true) addEvent("onHouseSystemHouseWithdraw", true) addEvent("onHouseSystemWeaponDeposit", true) addEvent("onHouseSystemWeaponWithdraw", true) addEvent("onHouseSystemRentableSwitch", true) addEvent("onHouseSystemRentalprice", true) addEvent("onHouseSystemTenandRemove", true) addEvent("onHouseSystemInfoBuy", true) addEvent("onHouseSystemInfoRent", true) addEvent("onHouseSystemInfoEnter", true) addEvent("onHouseSystemHouseExit", true) local handler -- local only, we don't need a global handler local saveableValues = { ["MONEY"] = "MONEY", ["WEAP1"] = "WEAP1", ["WEAP2"] = "WEAP2", ["WEAP3"] = "WEAP3", ["LOCKED"] = "LOCKED", ["OWNER"] = "OWNER", ["RENTABLE"] = "RENTABLE", ["RENTALPRICE"] = "RENTALPRICE", ["RENT1"] = "RENT1", ["RENT2"] = "RENT2", ["RENT3"] = "RENT3", ["RENT4"] = "RENT4", ["RENT5"] = "RENT5", } local created = false -- DONT EDIT local houseid = 0 -- Define the Houseid, local house = {} -- The House array local houseData = {} -- The House Data arry local houseInt = {} -- The House Interior array local houseIntData = {} -- The House Interior Data Array local buildStartTick local buildEndTick local rentTimer -- STARTUP EVENT HANDLER -- addEventHandler("onResourceStart", getResourceRootElement(), function() handler = dbConnect("mysql", "dbname="..mysqldatabase1..";host="..mysqlhost1, mysqluser1, mysqlpassword1, "autoreconnect=1") -- If the Handler 1 dont work if not(handler) then outputServerLog("[HOUSESYSTEM]MySQL handler 1 not accepted! Trying secondary handler...") handler = dbConnect("mysql", "dbname="..mysqldatabase2..";host="..mysqlhost2, mysqluser2, mysqlpassword2, "autoreconnect=1") if not(handler) then outputServerLog("[HOUSESYSTEM]MySQL handler 2 not accepted! Shutting down...") cancelEvent() else outputServerLog("[HOUSESYSTEM]MySQL handler 2 accepted!") housesys_startup() end else outputServerLog("[HOUSESYSTEM]MySQL handler 1 accepted!") housesys_startup() end end) -- SHUTDOWN EVENT HANDLER -- addEventHandler("onResourceStop", getResourceRootElement(), function() -- Free the arrays -- for index, houses in pairs(house) do houses = nil end for index, houseDatas in pairs(houseData) do houseDatas = nil end for index, houseInts in pairs(houseInt) do houseInts = nil end for index, houseIntDatas in pairs(houseIntData) do houseIntDatas = nil end houseid = 0 created = false end) -------------- -- COMMANDS -- -------------- -- /unrent -- addCommandHandler("unrent", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local id = tonumber(getElementData(thePlayer, "house:lastvisit")) if(isPlayerRentedHouse(thePlayer, id) == false) then outputChatBox("You are not tenad of this house!", thePlayer, 255, 0, 0) return end local sucess = removeHouseTenand(id, thePlayer) if(sucess == true) then outputChatBox("You have sucessfull terminate the tenancy!", thePlayer, 0, 255, 0) else outputChatBox("An error occurred!", thePlayer, 255, 0, 0) end end end) -- /rent -- addCommandHandler("rent", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local id = tonumber(getElementData(thePlayer, "house:lastvisit")) if(houseData[id]["OWNER"] == getPlayerName(thePlayer)) then outputChatBox("You can't rent here! It's your house!", thePlayer, 255, 0, 0) return end if(tonumber(houseData[id]["RENTABLE"]) ~= 1) then outputChatBox("This house is not rentable!", thePlayer, 255, 0, 0) return end if(getPlayerRentedHouse(thePlayer) ~= false) then outputChatBox("You are allready a tenand in a house! Use /unrent first.", thePlayer, 255, 0, 0) return end local sucess = addHouseTenand(thePlayer, id) if(sucess == true) then outputChatBox("You are now tenand this house!", thePlayer, 0, 255, 0) else outputChatBox("You can't rent this house!", thePlayer, 255, 0, 0) end end end) -- /createhouse -- addCommandHandler("createhouse", function(thePlayer) if(hasObjectPermissionTo ( thePlayer, "function.kickPlayer", false ) ) then if(getElementInterior(thePlayer) ~= 0) then outputChatBox("You are not outside!", thePlayer, 255, 0, 0) return end if(isPedInVehicle(thePlayer) == true) then outputChatBox("Please exit your vehicle.", thePlayer, 255, 0, 0) return end -- INSERT SECURITY OPTIONS LIKE ADMINLEVEL HERE( if(adminlevel > shit) then ...) triggerClientEvent(thePlayer, "onClientHouseSystemGUIStart", thePlayer) else outputChatBox("You are not an admin!", thePlayer, 255, 0, 0) end end) -- /in -- addCommandHandler("in", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local house = getElementData(thePlayer, "house:lastvisit") if(house) then local id = tonumber(house) if(tonumber(houseData[id]["LOCKED"]) == 0) or (houseData[id]["OWNER"] == getPlayerName(thePlayer)) or (isPlayerRentedHouse(thePlayer, id) == true) then local int, intx, inty, intz, dim = houseIntData[id]["INT"], houseIntData[id]["X"], houseIntData[id]["Y"], houseIntData[id]["Z"], id setElementData(thePlayer, "house:in", true) setInPosition(thePlayer, intx, inty, intz, int, false, dim) unbindKey(thePlayer, open_key, "down", togglePlayerInfomenue, id) setElementData(thePlayer, "house:lastvisitINT", id) if(houseData[id]["OWNER"] == getPlayerName(thePlayer)) or (isPlayerRentedHouse(thePlayer, id) == true) then bindKey(thePlayer, open_key, "down", togglePlayerHousemenue, id) end else outputChatBox("You don't have the housekey for this House!", thePlayer, 255, 0, 0) end end end end) -- /out -- addCommandHandler("out", function(thePlayer) if(getElementData(thePlayer, "house:lastvisitINT")) and (getElementData(thePlayer, "house:lastvisitINT") ~= false) then local house = getElementData(thePlayer, "house:lastvisitINT") if(house) then local id = tonumber(house) local x, y, z = houseData[id]["X"], houseData[id]["Y"], houseData[id]["Z"] setElementData(thePlayer, "house:in", false) setInPosition(thePlayer, x, y, z, 0, false, 0) end end end) -- /buyhouse -- addCommandHandler("buyhouse", function(thePlayer) if(getElementData(thePlayer, "house:lastvisit")) and (getElementData(thePlayer, "house:lastvisit") ~= false) then local house = getElementData(thePlayer, "house:lastvisit") if(house) then local id = house local owner = houseData[id]["OWNER"] if(owner ~= "no-one") then outputChatBox("You can't buy this house!", thePlayer, 255, 0, 0) else local houses = 0 for index, col in pairs(getElementsByType("colshape")) do if(getElementData(col, "house") == true) and (houseData[getElementData(col, "ID")]["OWNER"] == getPlayerName(thePlayer)) then Link to comment
Karuzo Posted June 5, 2014 Share Posted June 5, 2014 ofc. there are house exits. just type /out Link to comment
DuaLVII Posted June 5, 2014 Share Posted June 5, 2014 The 2 scripts I added includes it onto the interface unless the player is not the house owner, the player will exit on collision with the arrow. Link to comment
Birkin Posted April 7, 2015 Share Posted April 7, 2015 Could someone change that record was on the account, and not on the nickname? Link to comment
_Evo_ Posted August 13, 2015 Share Posted August 13, 2015 can u add button for get out from house please.. some players dont know do /out Link to comment
Tony Brand Posted September 11, 2018 Share Posted September 11, 2018 can you add any cmd or option for house owners to change House Price & make House for sell for another players? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now