PDA

View Full Version : When i us /kupikucu (/buyhouse) thet the dialog dont shov


Pasa
30/12/2011, 10:05 AM
here is the enum


enum hInfo
{
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hHealthx,
hHealthy,
hHealthz,
hArmourx,
hArmoury,
hArmourz,
hOwner[MAX_PLAYER_NAME],
hDiscription[MAX_PLAYER_NAME],
hValue,
hHel,
hArm,
hInt,
hLock,
hOwned,
hRooms,
hRent,
hRentabil,
hTakings,
hVec,
hVcol1,
hVcol2,
hDate,
hLevel,
hWorld
};


Here is the command

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 1;
}

PlayHard
30/12/2011, 10:16 AM
Try this

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;
}