22.02.2012, 06:54
i add and here but don't work
PHP код:
stock OpenHouseDialog(playerid, houseid)
{
if(strcmp(hInfo[houseid][Name], "ForSale",true) == 0)
{
new string[180];
if(GetPlayerScore(playerid) >= 1000) return SendClientMessage(playerid, 0xFFFFFFAA, "You have to get 1000 score before you can use this command");
if(GetPlayerMoney(playerid) >= hInfo[houseid][Cost]) { format(string,sizeof(string),"{33AA33}Buy this house for $%d", hInfo[houseid][Cost]); }
else { format(string,sizeof(string),"{FF0000}Buy this house for $%d", hInfo[houseid][Cost]); }
ShowPlayerDialog(playerid, DIALOG_FORSALE_HOUSE, DIALOG_STYLE_LIST, "{33AA33}For Sale!", string, "OK", "Close");
return 1;
}
else
{
new string2[180];
new name[24];
GetPlayerName(playerid,name,sizeof(name));
if(strcmp(hInfo[houseid][Name], name, true) == 0)
{
ShowPlayerDialog(playerid, DIALOG_MY_HOUSE,DIALOG_STYLE_LIST, "{33AA33}Welcome back to your house", "{33AA33}Enter in your house\n{33AA33}Open/Close the door\n{33AA33}Sell your house", "OK", "Close");
return 0;
}