[Pomoc] HC Bug

Započeo Ekii, Jul 30, 2013, 21:54:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Underground Balkan RP
Detaljan opis problema: Kad se kupi HC,bilo koji da se izabere,umjesto njega postavi se neki kombi (msm da je  pony onaj il ness) i on se svakim relogom duplira..
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

daj cmd za kupovinu hc-a
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


COMMAND:kuca(playerid,params[])
{
    new string[128];
    new x_job[128];
    new idx;
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    new gouse = PlayerInfo[playerid][pPhousekey];
    if(PlayerInfo[playerid][pPhousekey] == 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], false) == 0) {
        SendClientMessage( playerid, WHITE, "Ne posjedujes kucu!" );
        return 1;
    }

    x_job = strtok(params, idx);
    if(!strlen(x_job) && PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) {
        format( string, sizeof( string ), " %s | Cijena: %d (ID Kuce: %d) Vlasnik: %s", Houses[PlayerInfo[playerid][pPhousekey]][hOpis],Houses[PlayerInfo[playerid][pPhousekey]][HousePrice], PlayerInfo[playerid][pPhousekey], Houses[PlayerInfo[playerid][pPhousekey]][hOwner]);
        SendClientMessage( playerid, 0x366936FF, string);
        SendClientMessage(playerid, 0x5C865CFF,"{168BFF}POMOC:{838361} /kuca [ime]");
        SendClientMessage(playerid, 0x6D936DFF,"Dostupno: prodaj, informacije, preuredi, izvadi, ostavi");
        SendClientMessage(playerid, 0x7EA07EFF,"Dostupno: otkljucaj, zakljucaj, kupisef, kucnovozilo, rent, rentabil");
        return 1;
    }
    if(strcmp(x_job,"kucnovozilo",true) == 0) {
        new house = PlayerInfo[playerid][pPhousekey];
        if (GetPlayerMoney(playerid) < 50000) {
            SendClientMessage(playerid, 0xA0A0A0FF,"Nemas dovoljno novca (50000$)!");
            return 1;
        }
        if (PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && GetPVarInt(playerid, "DonatorRank")  == 0) {
            ShowPlayerDialog(playerid, HCMENU, DIALOG_STYLE_LIST, "Odaberi vozilo!","Jester\nGreenwood \nSentinel \nWashington \nBuffalo \nElegant \nWindsor \nElegy \nHustler \nAdmiral \nFeltzer \nFlash\nInfernus(5 Bodova)\nTurismo(5 bodova)\nSlamvan(2 Boda)\nSuper GT(3 Boda)", "Odaberi", "Ponisti");
            SaveHouse(house);
        }
    }
    if(strcmp(x_job,"prodaj",true) == 0) {
        new sendername[MAX_PLAYER_NAME], stringt[64];
        if(PlayerInfo[playerid][pPhousekey] == 255) {
            SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes kucu.");
            return 1;
        }
        if(PlayerInfo[playerid][pMarried] > 0) {
            SendClientMessage(playerid, COLOR_GREY, "   Udana/Vjencan si, ne mozes prodati kucu !");
            return 1;
        }

        if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) {
            new id;
            new house = PlayerInfo[playerid][pPhousekey];
            Houses[house][hOwned] = 0;
            PlayerInfo[playerid][pHCar] = 0;
            Houses[house][LockStatus] = 1;
            Houses[house][hVec] = 418;
            Houses[house][hVcol1] = 1;
            Houses[house][hVcol2] = 1;
            DestroyVehicle(HouseVehicle[playerid]);
            GetPlayerName(playerid, sendername, sizeof(sendername));
            strmid(Houses[house][hOwner], "Niko", 0, strlen("Niko"), 255);
            ConsumingMoney[playerid] = 1;
            Houses[house][hOwned] = 0;
            PlayerInfo[playerid][pSpawnChange] = 1;
            GivePlayerCash(playerid,Houses[house][HousePrice]);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format( stringt, sizeof( stringt ), "~y~Prodali ste kucu za: ~g~%d$", Houses[house][HousePrice]);
            GameTextForPlayer(playerid, stringt, 5000, 1);
            PlayerInfo[playerid][pPhousekey] = 255;
            if(PlayerInfo[playerid][pLocal] == house) {
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid,Houses[house][hExteriorX],Houses[house][hExteriorY],Houses[house][hExteriorZ]);
                PlayerInfo[playerid][pInt] = 0;
            }
            SaveHouse(house);
            OnPropTextdrawUpdate(1,id);
            SacuvajIgraca(playerid);
            return 1;

        }

    }
    if(strcmp(x_job,"preuredi",true) == 0) {
        new h = PlayerInfo[playerid][pPhousekey];
        if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) {
            if(Houses[h][hType] == 1) {
                ShowPlayerDialog(playerid, KUCAMENU1, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Mala Kuca","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3\n{0080C0}Interijer 4", "Odaberi", "Ponisti");
            }
            if(Houses[h][hType] == 2) {
                ShowPlayerDialog(playerid, KUCAMENU2, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Srednja Kuca","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3\n{0080C0}Interijer 4", "Odaberi", "Ponisti");
            }
            if(Houses[h][hType] == 3) {
                ShowPlayerDialog(playerid, KUCAMENU3, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Velika Kuca","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3\n{0080C0}Interijer 4", "Odaberi", "Ponisti");
            }
            if(Houses[h][hType] == 4) {
                ShowPlayerDialog(playerid, KUCAMENU4, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Vila","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
            }
            if(Houses[h][hType] == 5) {
                SendClientMessage(playerid,COLOR_WHITE,"Ova opcija nije dostupna za prikolicu !");
            }
            if(Houses[h][hType] == 0) {
                ShowPlayerDialog(playerid, KUCAMENU1, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Mala Kuca","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3\n{0080C0}Interijer 4", "Odaberi", "Ponisti");
            }
        }
        else { SendClientMessage( playerid, WHITE, "Ne posjedujes kucu!" );}
        return 1;
    }
    if(strcmp(x_job,"informacije",true) == 0) {

        if( PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0  ) {

            if(Houses[gouse][VaultMoney] != -1) {

                format( string, sizeof( string ), " Opis: %s | Adresa: %s | Cijena: %d ", Houses[PlayerInfo[playerid][pPhousekey]][hOpis],Houses[PlayerInfo[playerid][pPhousekey]][hAddres], Houses[PlayerInfo[playerid][pPhousekey]][HousePrice]);
                SendClientMessage( playerid, 0x11884DFF, string);
                format( string, sizeof( string ), " Vlasnik: %s | Level: %d | Rent: %d$ ",Houses[PlayerInfo[playerid][pPhousekey]][hOwner], Houses[PlayerInfo[playerid][pPhousekey]][hLevel], Houses[PlayerInfo[playerid][pPhousekey]][hRent]);
                SendClientMessage( playerid, 0x309764FF, string);
                SendClientMessage( playerid, 0x4BA478FF, "___________Kucni Sef___________" );
                if(Houses[gouse][VaultMoney] > 0) {
                    format( string, sizeof( string ), "Novac: $%d ", Houses[gouse][VaultMoney]);
                    SendClientMessage( playerid, 0x5EAE86FF, string);

                }
                if(Houses[gouse][HouseCocaine] > 0) {
                    format( string, sizeof( string ), "Droga: %d grama.", Houses[gouse][HouseCocaine]);
                    SendClientMessage( playerid, 0x74B997FF, string);

                }
                if(Houses[gouse][HouseMaterials] > 0) {
                    format( string, sizeof( string ), "Materijali: %d ", Houses[gouse][HouseMaterials]);
                    SendClientMessage( playerid, 0x86C2A4FF, string);

                }
                if(Houses[gouse][HouseMaterials] == 0 && Houses[gouse][HouseCocaine] == 0 && Houses[gouse][VaultMoney] == 0) {
                    SendClientMessage( playerid, 0x97CAB0FF, "Tvoj kucni sef je prazan!" );

                }
                SendClientMessage( playerid, 0xA3D0B9FF, "______________________________" );
                SaveHouse( gouse);
            }
            else { SendClientMessage( playerid, 0xACD4BFFF, "Nemas kucni sef! Koristi /kuca kupisef da ga kupis!" );}
        }
        return 1;
    }
    if(strcmp(x_job,"kupisef",true) == 0) {

        if( PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0  ) {

            if(Houses[gouse][VaultMoney] != -1) {
                if(GetPlayerMoney(playerid) >= 5000) {
                    GivePlayerCash(playerid, - 5000);
                    Houses[gouse][VaultMoney] = 1;
                    SaveHouse(gouse);
                    SendClientMessage( playerid, 0xB1D8C4FF, "Kupio si kucni sef! Sada mozes ostavljati Materijale/Drogu/Novac u sef." );
                }
                else {
                    SendClientMessage( playerid, WHITE, "Nemas dovoljno novca(5000$)." );
                }

            }
            else { SendClientMessage( playerid, WHITE, "Vec imas kucni sef!" );}
        }
        else { SendClientMessage( playerid, WHITE, "Ne posjedujes kucu!" );}
        return 1;
    }
    else if(strcmp(x_job,"otkljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPhousekey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hExteriorX], Houses[gouse][hExteriorY], Houses[gouse][hExteriorZ])) {
            if(Houses[gouse][LockStatus] == 1) {
                Houses[gouse][LockStatus] = 0;
                SaveHouse(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Kuca otkljucana." );
            }
        }
        return 1;
    }
    else if(strcmp(x_job,"zakljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPhousekey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hExteriorX], Houses[gouse][hExteriorY], Houses[gouse][hExteriorZ])) {
            if(Houses[gouse][LockStatus] == 0) {
                Houses[gouse][LockStatus] = 1;
                SaveHouse(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Kuca zakljucana." );
            }
        }
        return 1;
    }
    else if(strcmp(x_job,"rent",true) == 0) {
        if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) {
            new id;
            temp = strtok(params, idx);
            if(!strlen(temp)) {
                SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561}/kuca rent [cijena]");
                return 1;
            }
            moneys = strval(temp);
            if(moneys > 500 || moneys < 1) {
                SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 1$ i preko 500$ !");
                return 1;
            }
            else {
                Houses[gouse][hRent] = moneys;
                format( string, sizeof( string ), "Postavio si cijenu renta na $%d .", moneys);
                SendClientMessage( playerid, WHITE, string);
                SaveHouse(gouse);
                OnPropTextdrawUpdate(1,id);
                SacuvajIgraca(playerid);
            }
        }
        else {
            SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu !");
            return 1;
        }
    }
    else if(strcmp(x_job,"rentabil",true) == 0) {
        if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) {
            new id;
            temp = strtok(params, idx);
            if(!strlen(temp)) {
                SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561}/kuca rentabil [0/1]");
                return 1;
            }
            moneys = strval(temp);
            if(moneys == 1) {
                SendClientMessage(playerid, COLOR_GRAD1, " Kuca je dostupna za rentanje!");
                Houses[gouse][hRentabil] = 1;
                SaveHouse(gouse);
                OnPropTextdrawUpdate(1,id);
                SacuvajIgraca(playerid);
            }
            if(moneys == 0) {
                SendClientMessage(playerid, COLOR_GRAD1, " Kuca je nije dostupna za rentanje!");
                Houses[gouse][hRentabil] = 0;
                SaveHouse(gouse);
                OnPropTextdrawUpdate(1,id);
                SacuvajIgraca(playerid);
            }

        }
        else {
            SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu !");
            return 1;
        }
    }
    else if(strcmp(x_job,"ostavi",true) == 0) {

        if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 &&  Houses[gouse][VaultMoney] != -1) {

            new x_nr[128];
            x_nr = strtok(params, idx);
            if(!strlen(x_nr)) {
                SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /kuca ostavi [mats/droga/novac] [kolicina]");
                return 1;
            }

            if(strcmp(x_nr, "mats", true) == 0) {

                if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && Houses[gouse][VaultMoney] != -1) {

                    if(IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hInteriorX], Houses[gouse ][hInteriorY], Houses[gouse][hInteriorZ])) {
                        temp = strtok(params, idx);
                        if(!strlen(temp)) {
                            SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /kuca ostavi mats [kolicina]");
                            return 1;
                        }
                        moneys = strval(temp);
                        if(PlayerInfo[playerid][pMats] < 1) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas Materijala kod sebe!");
                            return 1;
                        }
                        if(Houses[gouse][HouseMaterials] >= 20000 && GetPVarInt(playerid, "DonatorRank") != 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne mozes ostaviti vise matsa u kucni sef!");
                            return 1;
                        }
                        if(Houses[gouse][HouseMaterials] >= 15000 && GetPVarInt(playerid, "DonatorRank") == 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne mozes ostaviti vise matsa u kucni sef!");
                            return 1;
                        }
                        if(PlayerInfo[playerid][pMats] < moneys) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko materijala kod sebe!");
                            return 1;
                        }
                        if(moneys > 500 || moneys < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
                            return 1;
                        }
                        if(PlayerInfo[playerid][pMats] >= moneys) {
                            PlayerInfo[playerid][pMats] -= moneys;
                            Houses[gouse][HouseMaterials] += moneys;
                            SaveHouse( gouse);
                            format(string,sizeof(string), "Sakrio si %d Materijala u svoju kucu", moneys);
                            SendClientMessage(playerid, 0xC0C0C0FF, string);
                        }

                    }
                    else {
                        SendClientMessage(playerid, COLOR_GRAD1, " Nisi kod svoje kuce !");
                        return 1;
                    }
                }
                else {
                    SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu/kucni sef !");
                    return 1;
                }
            }

            if(strcmp(x_nr, "droga", true) == 0) {

                if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && Houses[gouse][VaultMoney] != -1) {
                    if(IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hInteriorX], Houses[gouse ][hInteriorY], Houses[gouse][hInteriorZ])) {
                        temp = strtok(params, idx);
                        if(!strlen(temp)) {
                            SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /ostavi droga [kolicina]");
                            return 1;
                        }
                        moneys = strval(temp);
                        if(PlayerInfo[playerid][pDrugs] < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas droge kod sebe !");
                            return 1;
                        }
                        if(Houses[gouse][HouseCocaine] >= 2500 && GetPVarInt(playerid, "DonatorRank") != 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne mozes ostaviti vise droge u kucni sef!");
                            return 1;
                        }
                        if(Houses[gouse][HouseCocaine] >= 2000 && GetPVarInt(playerid, "DonatorRank") == 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne mozes ostaviti vise droge u kucni sef!");
                            return 1;
                        }
                        if(PlayerInfo[playerid][pDrugs] < moneys) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko droge kod sebe !");
                            return 1;
                        }
                        if(moneys > 500 || moneys < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
                            return 1;
                        }
                        if(PlayerInfo[playerid][pDrugs] >= moneys) {
                            PlayerInfo[playerid][pDrugs] -= moneys;
                            Houses[gouse][HouseCocaine] += moneys;
                            SaveHouse( gouse);
                            format(string,sizeof(string), " Sakrio si %d grama droge u kucu.", moneys);
                            SendClientMessage(playerid, 0xC0C0C0FF, string);
                        }
                    }
                    else {
                        SendClientMessage(playerid, COLOR_GRAD1, " Nisi u svojoj kuci !");
                        return 1;
                    }
                }
                else {
                    SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu/kucni sef !");
                    return 1;
                }
            }
            if(strcmp(x_nr, "novac", true) == 0) {

                if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && Houses[gouse][VaultMoney] != -1) {
                    if(IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hInteriorX], Houses[gouse ][hInteriorY], Houses[gouse][hInteriorZ])) {
                        temp = strtok(params, idx);
                        if(!strlen(temp)) {
                            SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /ostavi novac [kolicina]");
                            return 1;
                        }
                        moneys = strval(temp);
                        if(GetPlayerMoney(playerid) < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Prvo otplati dug pa dodi !");
                            return 1;
                        }
                        if(GetPlayerMoney(playerid) < moneys) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko novca kod sebe !");
                            return 1;
                        }
                        if(moneys > 5000 || moneys < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 5000 !");
                            return 1;
                        }
                        if(GetPlayerMoney(playerid) >= moneys) {
                            GivePlayerCash(playerid, -moneys);
                            Houses[gouse][VaultMoney] += moneys;
                            SaveHouse( gouse);
                            format(string,sizeof(string), " Ostavio si %d$ u kucu.", moneys);
                            SendClientMessage(playerid, 0xC0C0C0FF, string);
                        }
                    }
                    else {
                        SendClientMessage(playerid, COLOR_GRAD1, " Nisi u svojoj kuci !");
                        return 1;
                    }
                }
                else {
                    SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu/kucni sef !");
                    return 1;
                }
            }
        }

        return 1;
    }
    else if(strcmp(x_job,"izvadi",true) == 0) {

        if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 &&  Houses[gouse][VaultMoney] != -1) {

            new x_nr[128];
            x_nr = strtok(params, idx);
            if(!strlen(x_nr)) {
                SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /kuca izvadi [mats/droga/novac] [kolicina]");
                return 1;
            }

            if(strcmp(x_nr, "mats", true) == 0) {

                if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && Houses[gouse][VaultMoney] != -1) {

                    if(IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hInteriorX], Houses[gouse ][hInteriorY], Houses[gouse][hInteriorZ])) {
                        temp = strtok(params, idx);
                        if(!strlen(temp)) {
                            SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /kuca izvadi mats [kolicina]");
                            return 1;
                        }
                        moneys = strval(temp);
                        if(Houses[gouse][HouseMaterials] == 1) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas Materijala u sefu!");
                            return 1;
                        }
                        if(Houses[gouse][HouseMaterials] < moneys) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko materijala u sefu!");
                            return 1;
                        }
                        if(moneys > 500 || moneys < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
                            return 1;
                        }
                        if(Houses[gouse][HouseMaterials] >= moneys) {
                            PlayerInfo[playerid][pMats] += moneys;
                            Houses[gouse][HouseMaterials] -= moneys;
                            SaveHouse( gouse);
                            format(string,sizeof(string), "Izvadio si %d Materijala iz kucnog sefa", moneys);
                            SendClientMessage(playerid, 0xC0C0C0FF, string);
                        }

                    }
                    else {
                        SendClientMessage(playerid, COLOR_GRAD1, " Nisi kod svoje kuce !");
                        return 1;
                    }
                }
                else {
                    SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu/kucni sef !");
                    return 1;
                }
            }

            if(strcmp(x_nr, "droga", true) == 0) {

                if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && Houses[gouse][VaultMoney] != -1) {
                    if(IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hInteriorX], Houses[gouse ][hInteriorY], Houses[gouse][hInteriorZ])) {
                        temp = strtok(params, idx);
                        if(!strlen(temp)) {
                            SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /izvadi droga [kolicina]");
                            return 1;
                        }
                        moneys = strval(temp);
                        if(Houses[gouse][HouseCocaine] == 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas droge u kucnom sefu !");
                            return 1;
                        }
                        if(PlayerInfo[playerid][pDrugs] < moneys) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko u kucnom sefu !");
                            return 1;
                        }
                        if(moneys > 500 || moneys < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
                            return 1;
                        }
                        if(Houses[gouse][HouseCocaine] >= moneys) {
                            PlayerInfo[playerid][pDrugs] += moneys;
                            Houses[gouse][HouseCocaine] -= moneys;
                            SaveHouse( gouse);
                            format(string,sizeof(string), " Izvadio si %d grama droge iz kucnog sefa.", moneys);
                            SendClientMessage(playerid, 0xC0C0C0FF, string);
                        }
                    }
                    else {
                        SendClientMessage(playerid, COLOR_GRAD1, " Nisi u svojoj kuci !");
                        return 1;
                    }
                }
                else {
                    SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu/kucni sef !");
                    return 1;
                }
            }
            if(strcmp(x_nr, "novac", true) == 0) {

                if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && Houses[gouse][VaultMoney] != -1) {
                    if(IsPlayerInRangeOfPoint( playerid, 5, Houses[gouse][hInteriorX], Houses[gouse ][hInteriorY], Houses[gouse][hInteriorZ])) {
                        temp = strtok(params, idx);
                        if(!strlen(temp)) {
                            SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /ostavi novac [kolicina]");
                            return 1;
                        }
                        moneys = strval(temp);
                        if(Houses[gouse][VaultMoney] == 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas uopce novca u kucnom sefu !");
                            return 1;
                        }
                        if(Houses[gouse][VaultMoney] < moneys) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko novca u kucnom sefu !");
                            return 1;
                        }
                        if(moneys > 5000 || moneys < 0) {
                            SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 5000 !");
                            return 1;
                        }
                        if(GetPlayerMoney(playerid) >= moneys) {
                            GivePlayerCash(playerid, moneys);
                            Houses[gouse][VaultMoney] -= moneys;
                            SaveHouse( gouse);
                            format(string,sizeof(string), " Izvadio si %d$ iz kucnog sefa.", moneys);
                            SendClientMessage(playerid, 0xC0C0C0FF, string);
                        }
                    }
                    else {
                        SendClientMessage(playerid, COLOR_GRAD1, " Nisi u svojoj kuci !");
                        return 1;
                    }
                }
                else {
                    SendClientMessage(playerid, COLOR_GRAD1, " Ne posjedujes kucu/kucni sef !");
                    return 1;
                }
            }
        }

        return 1;
    }
    return 1;
}


Ovde je sve ok a daj mi ovaj dialog HCMENU msm to dialogid == HCMENU il tako u pretrazi kucaj... Daj mi taj deo
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


CMD:hc(playerid, params[])
{
    new string[128];
    new x_job[128];
    new idx;
    new house = PlayerInfo[playerid][pPhousekey];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    x_job = strtok(params, idx);
    if(!strlen(x_job)) {
        SendClientMessage(playerid, 0xA0A0A0FF,"___________________Kucno Vozilo________________");
        SendClientMessage(playerid, 0xA0A0A0FF,"HouseCar |/hc parkiraj, boja, spawn, lociraj!");
        return 1;
    }

    else if(strcmp(x_job,"parkiraj",true) == 0) {

        if (house != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && PlayerToPoint(60.0, playerid,Houses[house][hExteriorX], Houses[house][hExteriorY], Houses[house][hExteriorZ]) && PlayerInfo[playerid][pHCar] == 1 && IsPlayerInVehicle(playerid, HouseVehicle[playerid])) {
            GetVehiclePos(HouseVehicle[playerid],PlayerInfo[playerid][pHCPos_x] ,PlayerInfo[playerid][pHCPos_y],PlayerInfo[playerid][pHCPos_z]);
            GetVehicleZAngle(HouseVehicle[playerid],PlayerInfo[playerid][pHCRot_]);
            SacuvajIgraca(playerid);
            SaveHouse(house);
            SendClientMessage(playerid, 0xA0A0A0FF, "Tvoje ce se vozilo odsada ovdje spawnati!");
            return 1;
        }
        else { SendClientMessage(playerid, COLOR_GREY, "Ne idi predaleko od svoje kuce!"); }
        return 1;
    }
    else if(strcmp(x_job,"lociraj",true) == 0) {
        if (house == 255 && PlayerInfo[playerid][pHCar] != 1) {
            SendClientMessage(playerid, COLOR_GREY, "Nemas vozilo!");
            return 1;
        }
        if (house != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && PlayerInfo[playerid][pHCar] == 1) { {
                new Float:x, Float:y, Float:z;
                GetVehiclePos(HouseVehicle[playerid], x, y, z);
                SetPlayerCheckpoint(playerid,x,y,z, 6.0);
                SendClientMessage(playerid, 0x0080C0FF, "Lokacija tvog kucnog vozila je postavljena na mapi!");
                return 1;
            }

        }

    }

    else if(strcmp(x_job,"boja",true) == 0) {

        if(house != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && PlayerInfo[playerid][pHCar] == 1) { {
                temp = strtok(params, idx);
                if(!strlen(temp)) {
                    SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /hc boja [boja 1-2] [ID boje]");
                    return 1;
                }
                new number = strval(temp);
                if(number > 2 || number < 1) {
                    SendClientMessage(playerid, COLOR_GRAD3,"Boja 1 ili 2!");
                    return 1;
                }
                temp = strtok(params, idx);
                if(!strlen(x_job)) {
                    SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /hc boja [boja 1-2] [ID boje]");
                    return 1;
                }
                new color = strval(temp);
                if(color > 126) {
                    SendClientMessage(playerid, COLOR_GRAD3,"Najveci ID boje je 126");
                    return 1;
                }
                if (GetPlayerMoney(playerid) < 5000) {
                    SendClientMessage(playerid, COLOR_GRAD3,"Nemas dovoljno novca ($5000)");
                    return 1;
                }
                if(number == 1) {
                    Houses[house][hVcol1] = color;
                    SaveHouse(house);
                    format(string, sizeof(string), "Boja 1 postavljena na ID %d -$5000",color);
                    SendClientMessage(playerid, COLOR_GRAD3,string);

                }
                else {
                    Houses[house][hVcol2] = color;
                    SaveHouse(house);
                    format(string, sizeof(string), "Boja 2 postavljena na ID %d -$5000",color);
                    SendClientMessage(playerid, COLOR_GRAD3,string);
                }
                SendClientMessage(playerid, COLOR_GRAD6, "Tvoj nova boja ce stici u roku od 24 sata!");
                GivePlayerCash(playerid,-5000);

            }
        }
        if(house == 255) {
            SendClientMessage(playerid, COLOR_GRAD6, "Ne posjedujes kucu ili kucno vozilo!");
            return 1;
        }
    }

    else if(strcmp(x_job,"spawn",true) == 0) {

        if (PlayerInfo[playerid][pHCar] == 0 && house != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0) {

            DestroyVehicle(HouseVehicle[playerid]);
            GetPlayerPos(playerid, PlayerInfo[playerid][pHCPos_x] ,PlayerInfo[playerid][pHCPos_y],PlayerInfo[playerid][pHCPos_z]);
            HouseVehicle[playerid] = CreateVehicle(Houses[house][hVec],PlayerInfo[playerid][pHCPos_x] ,PlayerInfo[playerid][pHCPos_y] +2.0,PlayerInfo[playerid][pHCPos_z] ,0.0,0,0,-1);
            GetVehiclePos(HouseVehicle[playerid],PlayerInfo[playerid][pHCPos_x] ,PlayerInfo[playerid][pHCPos_y],PlayerInfo[playerid][pHCPos_z]);
            GetVehicleZAngle(HouseVehicle[playerid],PlayerInfo[playerid][pHCPos_y]);
            PlayerInfo[playerid][pHCar] = 1;
            SetVehicleNumberPlate(HouseVehicle[playerid], "{800040}HouseCar");
            SacuvajIgraca(playerid);
            SaveHouse(house);
            SendClientMessage(playerid, 0xA0A0A0FF, "Spawnao si svoje vozilo !");
            return 1;
        }
        else { SendClientMessage(playerid, COLOR_GREY, "Vec imas jedno vozilo ili ne posjedujes kucu!"); }
        return 1;
    }

    return 1;
}

Slusaj brt daj mi dialog u kom kupujes HC ono HCMENU tako ti je definisano mislim ... Ako sam shvatio tebi je problem sto kad kupis HC to je pony a ne jester, sultan il sta si vec izabrao?
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Ne znam na sta ciljas jedino ovo sam mogao naci..nista vise nema u skripti


if(strcmp(x_job,"kucnovozilo",true) == 0) {
        new house = PlayerInfo[playerid][pPhousekey];
        if (GetPlayerMoney(playerid) < 50000) {
            SendClientMessage(playerid, 0xA0A0A0FF,"Nemas dovoljno novca (50000$)!");
            return 1;
        }
        if (PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, Houses[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0 && GetPVarInt(playerid, "DonatorRank")  == 0) {
            ShowPlayerDialog(playerid, HCMENU, DIALOG_STYLE_LIST, "Odaberi vozilo!","Jester\nGreenwood \nSentinel \nWashington \nBuffalo \nElegant \nWindsor \nElegy \nHustler \nAdmiral \nFeltzer \nFlash\nInfernus(5 Bodova)\nTurismo(5 bodova)\nSlamvan(2 Boda)\nSuper GT(3 Boda)", "Odaberi", "Ponisti");
            SaveHouse(house);
        }

Ama treba mi ono sto se nalazi pod ondialogresponse za to kucno vozilo aj probaj trazi ovako case HCMENU ili dialogid==HCMENU ili dialogid == HCMENU tako probaj nadji jer u komandi se ne vrsi kupovina vec se izbacuje dialog za kupovinu
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).



pa sta zoves bump, jel ti reko bugi sta da das..

daj dialog di kupis ili narucit taj hc
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!