Xavi Posted July 28, 2009 Author Share Posted July 28, 2009 Alright, so I have this house script:``` Case 1 If GetVar("houses.ini", "Houses", "1") = 0 Then Call SetMapName(1, GetPlayerName(index) & "'s House") Call PlayerMsg(index, "You bought the house!", WHITE) Call PutVar("houses.ini", "Houses", "1", "1") Else Call PlayerMsg(index, "This house is already owned by someone.", WHITE) End If Exit Sub```Basically, when the player steps on a tile, it checks in an INI to see if the number is 0, signifying that it hasn't been bought. If this is the case, it changes the name of the map to 's house and gives a message telling the player he/she bought the house. Otherwise, it informs the player that this house has already been bought.So, it seems to read correctly if or if not the house is owned, but it doesn't seem to change the map name. Any help? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 28, 2009 Share Posted July 28, 2009 The sources housing system does this exact same thing; changes the map title and everything; is that what you're trying to simulate? Because if you have access to the source, it's just one line of code that will get buying houses working again:replace this:```If GetVar("Data.ini", "Config", "OneHouseOnly") = 1 Then```With this:```If GetVar("Data.ini", "CONFIG", "OneHouseOnly") = "1" Then```In the source code (server-side), and the built-in house system would work.As for your script, I think the map would have to be refreshed, to see the changes. Link to comment Share on other sites More sharing options...
Xavi Posted July 29, 2009 Author Share Posted July 29, 2009 Alright, I'll try that. Link to comment Share on other sites More sharing options...
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