When i us /kupikucu (/buyhouse) thet the dialog dont shov
#1

here is the enum

PHP код:
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

PHP код:
    if(strcmp(cmd"/kupikucu"true) == 0)
    {
     * *if(
IsPlayerConnected(playerid))
     * *{
            new 
Float:oldposxFloat:oldposyFloat:oldposz;
            
GetPlayerName(playeridplayernamesizeof(playername));
            
GetPlayerPos(playeridoldposxoldposyoldposz);
            for(new 
0sizeof(HouseInfo); h++)
            {
                if(
PlayerToPoint(2.0playeridHouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
                {
                    if(
PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
                    {
                        
format(stringsizeof(string), " * Morate biit Level %d da biste kupili ovo !"HouseInfo[h][hLevel]);
                        
SendClientMessage(playeridCOLOR_GRAD5string);
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playernameHouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
                    {
                        
SendClientMessage(playeridCOLOR_WHITE" * Vec posjedujete kucu, kucajte /prodajkucu ako zelite da kupite ovu !");
                        return 
1;
                    }
                    if(
GetPlayerMoney(playerid) > HouseInfo[h][hValue])
                    {
                            if(
PlayerToPoint(2.0playeridHouseInfo[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(playeridCOLOR_WHITE" * Nemate dovoljno novca za kupovinu !");
                        return 
1;
                    }
                }
            }
        }
        return 
1;
    } 
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)