if(StaProdaje[playerid] == PR_STAN) { if(PlayerInfo[playerid][pStan] != -1) return SCM(playerid, GRAD2, "{F81414}[Greska!] {C3C3C3}Vi vec posjedujete jedan stan!"); PlayerInfo[playerid][pStan] = PlayerInfo[id][pStan]; new i = PlayerInfo[playerid][pStan]; PlayerInfo[id][pStan] = -1; strmid(StanInfo[PlayerInfo[playerid][pStan]][stVlasnik], imek, 0, strlen(imek), 255); GivePlayerMoney(playerid, -CenaProdaje[playerid]); GivePlayerMoney(id, CenaProdaje[playerid]); SCMF(playerid, BELA, "Uspjesno ste kupili stan od igraca %s po cijeni od $%d!", hIme[0],CenaProdaje[playerid]); SCMF(id, BELA, "Uspjesno ste prodali stan igracu %s za cijenu od $%d!", hIme[1],CenaProdaje[playerid]); StaProdaje[playerid] = 0; KomeProdaje[playerid] = -1; CenaProdaje[playerid] = 0; PonudioIgrac[playerid] = -1; StaProdaje[id] = 0; KomeProdaje[id] = -1; CenaProdaje[id] = 0; PonudioIgrac[id] = -1; UpdateStan(); SaveStanove(i); } |