23.07.2016, 02:00
O que tem de errado aqui que quando um player compra aparece ele como dono e tudo,mais mesmo assim outra pessoa pode chegar e comprar 

Quote:
case 1: { format(hfile, sizeof(hfile), "/Houses/%d.ini", GetEntID(playerid)); new nigname[MAX_PLAYER_NAME]; nigname = pName(playerid); new hprice; hprice = dini_Int(hfile, "Price"); new howner[256]; howner = dini_Get(hfile, "Owner"); new hname[256]; hname = dini_Get(hfile, "Name"); if(GetPlayerMoney(playerid) < hprice) return ShowPlayerDialog(playerid, DABOX-1, DIALOG_STYLE_MSGBOX, "House - Purchase", "You do not have enough money to purchase\nthis house!", "Ok", ""); if(strfind(howner, nigname, true) != -1) return ShowPlayerDialog(playerid, DABOX-1, DIALOG_STYLE_MSGBOX, "House - Purchase", "You already own this house!", "Ok", ""); dini_Set(hfile, "Owner", pName(playerid)); GivePlayerMoney(playerid, -hprice); PlayerPlaySound(playerid, 1058, 0, 0, 0); PlayerPlaySound(playerid, 1149, 0, 0, 0); ShowPlayerDialog(playerid, DABOX-1, DIALOG_STYLE_MSGBOX, "House - Purchase", "You have successfully purchased this house!", "", "Exit"); #if HMESSAGES == 1 new str[128]; format(str, sizeof(str), "%s purchased the House '%s' [ID:%d] for $%d!", pName(playerid), hname, GetEntID(playerid), hprice); SendClientMessageToAll(COLOR_BLUE, str); #endif |