Bug with my sell house command
#1

Fixed!
Reply
#2

Quote:
Originally Posted by Sc0pion
Посмотреть сообщение
How do I fix?
Can you please show us the code, where you check, if the house is free?
Reply
#3

Fixed!
Reply
#4

Then write in the sellhouse command:

Код:
hInfo[houseid][ForSale] = 1;
Greekz
Reply
#5

Fixed!
Reply
#6

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
Reply
#7

Fixed!
Reply
#8

Quote:
Originally Posted by Sc0pion
Посмотреть сообщение
You still didn't understand my problem
Or...you didn't understand my solution
Reply
#9

Fixed!
Reply
#10

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.");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)