[Pomoc]Stan CMD

Započeo Fantom_, Mart 05, 2013, 11:13:54 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:CLRP
Detaljan opis problema:Neradi mi STAn CMD
Dio skripte:COMMAND:stan(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][pPstankey];
    if(PlayerInfo[playerid][pPstankey] == 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], false) == 0) {
        SendClientMessage( playerid, WHITE, "Ne posjedujes Stan!" );
        return 1;
    }

    x_job = strtok(params, idx);
    if(!strlen(x_job) && PlayerInfo[playerid][pPstankey] != 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], true) == 0) {
        format( string, sizeof( string ), " %s | Cijena: %d (ID Stana: %d) Vlasnik: %s", Stan[PlayerInfo[playerid][pPstankey]][hOpis],Stan[PlayerInfo[playerid][pPstankey]][HousePrice], PlayerInfo[playerid][pPstankey], Stan[PlayerInfo[playerid][pPstankey]][hOwner]);
        SendClientMessage( playerid, 0x366936FF, string);
        SendClientMessage(playerid, 0x5C865CFF,"{168BFF}POMOC:{838361} /stan [ime]");
        SendClientMessage(playerid, 0x6D936DFF,"Dostupno: prodaj, informacije, preuredi");
        SendClientMessage(playerid, 0x7EA07EFF,"Dostupno: otkljucaj, zakljucaj");
        return 1;
    }
    if(strcmp(x_job,"prodaj",true) == 0) {
        new sendername[MAX_PLAYER_NAME], stringt[64];
        if(PlayerInfo[playerid][pPstankey] == 255) {
            SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes stan.");
            return 1;
        }

        if(PlayerInfo[playerid][pPstankey] != 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], true) == 0) {
            new id;
            new stan = PlayerInfo[playerid][pPstankey];
            Stan[stan][hOwned] = 0;
            Stan[stan][LockStatus] = 1;
            GetPlayerName(playerid, sendername, sizeof(sendername));
            strmid(Stan[stan][hOwner], "Niko", 0, strlen("Niko"), 255);
            ConsumingMoney[playerid] = 1;
            Stan[stan][hOwned] = 0;
            PlayerInfo[playerid][pSpawnChange] = 1;
            GivePlayerCash(playerid,Stan[stan][HousePrice]);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format( stringt, sizeof( stringt ), "~y~Prodali ste stan za: ~g~%d$", Stan[stan][HousePrice]);
            GameTextForPlayer(playerid, stringt, 5000, 1);
            PlayerInfo[playerid][pPstankey] = 255;
            if(PlayerInfo[playerid][pLocal] == stan) {
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid,Stan[stan][sExteriorX],Stan[stan][sExteriorY],Stan[stan][sExteriorZ]);
                PlayerInfo[playerid][pInt] = 0;
            }
            SaveStan(stan);
            OnPropTextdrawUpdate(4,id);
            SacuvajIgraca(playerid);
            return 1;

        }

    }
    else if(strcmp(x_job,"otkljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPstankey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Stan[gouse][sExteriorX], Stan[gouse][sExteriorY], Stan[gouse][sExteriorZ])) {
            if(Stan[gouse][LockStatus] == 1) {
                Stan[gouse][LockStatus] = 0;
                SaveStan(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Stan otkljucan." );
            }
        }
        return 1;
    }
    else if(strcmp(x_job,"zakljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPstankey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Stan[gouse][sExteriorX], Stan[gouse][sExteriorY], Stan[gouse][sExteriorZ])) {
            if(Stan[gouse][LockStatus] == 0) {
                Stan[gouse][LockStatus] = 1;
                SaveStan(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Stan zakljucan." );
            }
        }
        return 1;
    }
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Mart 05, 2013, 11:14:52 PRE PODNE od [AG]Johnny

Citat: [AG]Johnny poslato Mart 05, 2013, 11:13:54 PRE PODNE
Skripta koju koristim:CLRP
Detaljan opis problema:Neradi mi STAn CMD
Dio skripte:COMMAND:stan(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][pPstankey];
    if(PlayerInfo[playerid][pPstankey] == 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], false) == 0) {
        SendClientMessage( playerid, WHITE, "Ne posjedujes Stan!" );
        return 1;
    }

    x_job = strtok(params, idx);
    if(!strlen(x_job) && PlayerInfo[playerid][pPstankey] != 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], true) == 0) {
        format( string, sizeof( string ), " %s | Cijena: %d (ID Stana: %d) Vlasnik: %s", Stan[PlayerInfo[playerid][pPstankey]][hOpis],Stan[PlayerInfo[playerid][pPstankey]][HousePrice], PlayerInfo[playerid][pPstankey], Stan[PlayerInfo[playerid][pPstankey]][hOwner]);
        SendClientMessage( playerid, 0x366936FF, string);
        SendClientMessage(playerid, 0x5C865CFF,"{168BFF}POMOC:{838361} /stan [ime]");
        SendClientMessage(playerid, 0x6D936DFF,"Dostupno: prodaj, informacije, preuredi");
        SendClientMessage(playerid, 0x7EA07EFF,"Dostupno: otkljucaj, zakljucaj");
        return 1;
    }
    if(strcmp(x_job,"prodaj",true) == 0) {
        new sendername[MAX_PLAYER_NAME], stringt[64];
        if(PlayerInfo[playerid][pPstankey] == 255) {
            SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes stan.");
            return 1;
        }

        if(PlayerInfo[playerid][pPstankey] != 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], true) == 0) {
            new id;
            new stan = PlayerInfo[playerid][pPstankey];
            Stan[stan][hOwned] = 0;
            Stan[stan][LockStatus] = 1;
            GetPlayerName(playerid, sendername, sizeof(sendername));
            strmid(Stan[stan][hOwner], "Niko", 0, strlen("Niko"), 255);
            ConsumingMoney[playerid] = 1;
            Stan[stan][hOwned] = 0;
            PlayerInfo[playerid][pSpawnChange] = 1;
            GivePlayerCash(playerid,Stan[stan][HousePrice]);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format( stringt, sizeof( stringt ), "~y~Prodali ste stan za: ~g~%d$", Stan[stan][HousePrice]);
            GameTextForPlayer(playerid, stringt, 5000, 1);
            PlayerInfo[playerid][pPstankey] = 255;
            if(PlayerInfo[playerid][pLocal] == stan) {
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid,Stan[stan][sExteriorX],Stan[stan][sExteriorY],Stan[stan][sExteriorZ]);
                PlayerInfo[playerid][pInt] = 0;
            }
            SaveStan(stan);
            OnPropTextdrawUpdate(4,id);
            SacuvajIgraca(playerid);
            return 1;

        }

    }
    else if(strcmp(x_job,"otkljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPstankey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Stan[gouse][sExteriorX], Stan[gouse][sExteriorY], Stan[gouse][sExteriorZ])) {
            if(Stan[gouse][LockStatus] == 1) {
                Stan[gouse][LockStatus] = 0;
                SaveStan(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Stan otkljucan." );
            }
        }
        return 1;
    }
    else if(strcmp(x_job,"zakljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPstankey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Stan[gouse][sExteriorX], Stan[gouse][sExteriorY], Stan[gouse][sExteriorZ])) {
            if(Stan[gouse][LockStatus] == 0) {
                Stan[gouse][LockStatus] = 1;
                SaveStan(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Stan zakljucan." );
            }
        }
        return 1;
    }
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):




Evo ti stan znaci mora raditi u mom je gmu...


COMMAND:stan(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][pPstankey];
    if(PlayerInfo[playerid][pPstankey] == 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], false) == 0) {
        SendClientMessage( playerid, WHITE, "Ne posjedujes Stan!" );
        return 1;
    }

    x_job = strtok(params, idx);
    if(!strlen(x_job) && PlayerInfo[playerid][pPstankey] != 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], true) == 0) {
        format( string, sizeof( string ), " %s | Cijena: %d (ID Stana: %d) Vlasnik: %s", Stan[PlayerInfo[playerid][pPstankey]][hOpis],Stan[PlayerInfo[playerid][pPstankey]][HousePrice], PlayerInfo[playerid][pPstankey], Stan[PlayerInfo[playerid][pPstankey]][hOwner]);
        SendClientMessage( playerid, 0x366936FF, string);
        SendClientMessage(playerid, 0x5C865CFF,"{168BFF}POMOC:{838361} /stan [ime]");
        SendClientMessage(playerid, 0x6D936DFF,"Dostupno: prodaj, informacije, preuredi");
        SendClientMessage(playerid, 0x7EA07EFF,"Dostupno: otkljucaj, zakljucaj");
        return 1;
    }
    if(strcmp(x_job,"prodaj",true) == 0) {
        new sendername[MAX_PLAYER_NAME], stringt[64];
        if(PlayerInfo[playerid][pPstankey] == 255) {
            SendClientMessage(playerid, COLOR_WHITE, "Ne posjedujes stan.");
            return 1;
        }

        if(PlayerInfo[playerid][pPstankey] != 255 && strcmp(playername, Stan[PlayerInfo[playerid][pPstankey]][hOwner], true) == 0) {
            new id;
            new stan = PlayerInfo[playerid][pPstankey];
            Stan[stan][hOwned] = 0;
            Stan[stan][LockStatus] = 1;
            GetPlayerName(playerid, sendername, sizeof(sendername));
            strmid(Stan[stan][hOwner], "Niko", 0, strlen("Niko"), 255);
            ConsumingMoney[playerid] = 1;
            Stan[stan][hOwned] = 0;
            PlayerInfo[playerid][pSpawnChange] = 1;
            GivePlayerCash(playerid,Stan[stan][HousePrice]);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format( stringt, sizeof( stringt ), "~y~Prodali ste stan za: ~g~%d$", Stan[stan][HousePrice]);
            GameTextForPlayer(playerid, stringt, 5000, 1);
            PlayerInfo[playerid][pPstankey] = 255;
            if(PlayerInfo[playerid][pLocal] == stan) {
                AC_BS_SetPlayerInterior(playerid,0);
                AC_BS_SetPlayerPos(playerid,Stan[stan][sExteriorX],Stan[stan][sExteriorY],Stan[stan][sExteriorZ]);
                PlayerInfo[playerid][pInt] = 0;
            }
            SaveStan(stan);
            OnPropTextdrawUpdate(4,id);
            SacuvajIgraca(playerid);
            return 1;

        }

    }
    else if(strcmp(x_job,"otkljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPstankey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Stan[gouse][sExteriorX], Stan[gouse][sExteriorY], Stan[gouse][sExteriorZ])) {
            if(Stan[gouse][LockStatus] == 1) {
                Stan[gouse][LockStatus] = 0;
                SaveStan(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Stan otkljucan." );
            }
        }
        return 1;
    }
    else if(strcmp(x_job,"zakljucaj",true) == 0) {
#pragma unused params

        if( PlayerInfo[playerid][pPstankey] != 255  && IsPlayerInRangeOfPoint( playerid, 5, Stan[gouse][sExteriorX], Stan[gouse][sExteriorY], Stan[gouse][sExteriorZ])) {
            if(Stan[gouse][LockStatus] == 0) {
                Stan[gouse][LockStatus] = 1;
                SaveStan(gouse);
                SendClientMessage( playerid, 0xB1D8C4FF, "Stan zakljucan." );
            }
        }
        return 1;
    }
    return 1;
}
Moji Radiovi!
TuT||Iz code u MTA