21.09.2011, 11:31
i have doen this first time if house not buyed its show me the dialog buy first thing work now when i buy it and sell it its not give me the Dialog for buy again ! its give me that dialog Only for Enter Help!!
Код:
stock GetHouseStats(playerid, hid)
{
new str1[256];
new str2[256];
new housenumber = GetHouseID(playerid);
new pname[24];
GetPlayerName(playerid,pname,24);
format(str1,sizeof(str1),"%s House [%d]",hInfo[hid][Name],housenumber);
format(str2,sizeof(str2),"ForSale House [%d] - Cost ($%i)",housenumber,hInfo[hid][Cost]);
if(strcmp(hInfo[housenumber][Name],pname,true)==0){
ShowPlayerDialog(playerid,yourhouse,DIALOG_STYLE_LIST,"Your House","Enter House\nLock House\nUnlock House\nSell House","Select","Cancel");
}
if(strcmp(hInfo[housenumber][Name],pname,false)){
ShowPlayerDialog(playerid,notyourhouse,DIALOG_STYLE_LIST,str1,"Enter House","Enter","Cancel");
}
if(hInfo[housenumber][Owned] == 0){
ShowPlayerDialog(playerid,buyhouse,DIALOG_STYLE_LIST,str2,"Buy House\nTry House","Select","Cancel");
}
}



!