SA-MP Forums Archive
[HELP] selling house admin 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: [HELP] selling house admin command (/showthread.php?tid=541222)



[HELP] selling house admin command - Luca12 - 10.10.2014

Hello. Is there a way to make when for example player John John is offline and then admin ingame with command sell his house is there a way to somehow make when admin sell that house then house id in that player stats is set to -1 which means that he doens't have a house if you know what I mean? Thanks


Re: [HELP] selling house admin command - GGRoleplay - 10.10.2014

Quote:
Originally Posted by Luca12
Посмотреть сообщение
Hello. Is there a way to make when for example player John John is offline and then admin ingame with command sell his house is there a way to somehow make when admin sell that house then house id in that player stats is set to -1 which means that he doens't have a house if you know what I mean? Thanks
You could always attempt a /asellhouse [id]
Houses[id][IsForSale] = -2;

And then when he connects you can do it likes this
if(Houses[Player[playerid][HouseID][IsForSale] == -2)
{
SendClientMesssage(playerid, -1, "Your house has been sold by an admin");
Houses[Player[playerid][HouseID]][IsForSale] = -1;
Player[playerid][HouseID] = -1;
}

You could try something in that way