Bug with my sell house command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bug with my sell house command (
/showthread.php?tid=568096)
Bug with my sell house command -
Sc0pion - 19.03.2015
Fixed!
AW: Bug with my sell house command -
Kaliber - 19.03.2015
Quote:
Originally Posted by Sc0pion
How do I fix?
|
Can you please show us the code, where you check, if the house is free?
Re: Bug with my sell house command -
Sc0pion - 19.03.2015
Fixed!
AW: Bug with my sell house command -
Kaliber - 19.03.2015
Then write in the sellhouse command:
Код:
hInfo[houseid][ForSale] = 1;
Greekz
Re: Bug with my sell house command -
Sc0pion - 19.03.2015
Fixed!
AW: Re: Bug with my sell house command -
Kaliber - 19.03.2015
Quote:
Originally Posted by Sc0pion
but still the player will be able to sell his/her house and get cash untill i reload the server.
|
Write at the top of the sellhouse command:
Код:
if(hInfo[houseid][ForSale] == 1) return SCM(playerid,-1,"This house was already sold!");
hInfo[houseid][ForSale] = 1;
Greekz
Re: Bug with my sell house command -
Sc0pion - 19.03.2015
Fixed!
AW: Re: Bug with my sell house command -
Kaliber - 19.03.2015
Quote:
Originally Posted by Sc0pion
You still didn't understand my problem ![Sad](images/smilies/sad.gif)
|
Or...you didn't understand my solution
Re: Bug with my sell house command -
Sc0pion - 19.03.2015
Fixed!
Re: Bug with my sell house command -
Chrillzen - 19.03.2015
Make a player variable to check if the owner has a house or not. When he sells the house you set it to zero so he can't sell a house he doesn't own.
if(ownshouse[playerid] == 0) return SCM(playerid, COLOR_LIGHTRED, "You do not own a house.");