30.12.2011, 09:16
Try this
pawn Код:
if(strcmp(cmd, "/kupikucu", true) == 0)
{
* *if(IsPlayerConnected(playerid))
* *{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
{
format(string, sizeof(string), " * Morate biit Level %d da biste kupili ovo !", HouseInfo[h][hLevel]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, " * Vec posjedujete kucu, kucajte /prodajkucu ako zelite da kupite ovu !");
return 1;
}
if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
{
if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
{
* * * * * * * * * * * *if(HouseInfo[h][hDiscription] == 1)
{
ShowPlayerDialog(playerid,58,DIALOG_STYLE_LIST,"Odaberite interijer","Obicni\nMali\nSrednji\nVeliki","Odaberi","Prekid");
return 1;
}
* * * * * * * * * * * *if(HouseInfo[h][hDiscription] == 2)
{
ShowPlayerDialog(playerid,59,DIALOG_STYLE_LIST,"Odaberite interijer","Mallii\nMali\nSrednji\nVeliki","Odaberi","Prekid");
return 1;
}
* * * * * * * * * * * *if(HouseInfo[h][hDiscription] == 3)
{
ShowPlayerDialog(playerid,60,DIALOG_STYLE_LIST,"Odaberite interijer","SREDNJIII\nMali\nSrednji\nVeliki","Odaberi","Prekid");
return 1;
}
* * * * * * * * * * * *if(HouseInfo[h][hDiscription] == 4)
{
ShowPlayerDialog(playerid,61,DIALOG_STYLE_LIST,"Odaberite interijer","VELIKIII\nMali\nSrednji\nVeliki","Odaberi","Prekid");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " * Nemate dovoljno novca za kupovinu !");
return 1;
}
}
}
}
return 0;
}