[Pomoc]YCMD

Započeo aronx1d.pwn, Avgust 27, 2013, 14:03:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:BW
Detaljan opis problema:Pa kako da napravam /makeleader da bidi YCMD ???? moze vi da mi napravite eve vi CMD
Dio skripte://----------------------------------[MAKELEADER]------------------------------------------------
if(strcmp(cmd, "/makeleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /makeleader [ID Igraca/Deo Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_____________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.PD | 2.MBI | 3.ARM | 4.MD | 5.Yakuza | 6.LCN | 7. Hitman ");
SendClientMessage(playerid, 0x33CCFFAA, "8.Hitman | 9.Kanal-7 | 10.Taxi | 12.LSG | 15.GSF | 16. Ballas");
SendClientMessage(playerid, LIGHTRED, "|_____________________________________________________________|");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}Nemojte ispod 0 ili nad 17!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 5)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
            if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
            {
                SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}Toj igrac e vo nekaoja organizacija(Kiknete go prvo od org za da ne problemi so radiroto)!");
                return 1;
            }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "{37F906}INFO:{FFFFFF} Promovirani ste vo lider od strata na Administartor%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "{37F906}INFO:{FFFFFF} Go postavivte %s da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; }
else if(level == 1) { PlayerInfo[para1][pChar] = 265; } //LS PD
else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //swat
else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //hitna
else if(level == 5) { PlayerInfo[para1][pChar] = 120; } //Yakuza
else if(level == 6) { PlayerInfo[para1][pChar] = 113; } //LCN
else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //gradonacelnik
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //hitman
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Novinari
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
else if(level == 13) { PlayerInfo[para1][pChar] = 292; } //surenos
else if(level == 14) { PlayerInfo[para1][pChar] = 21; } //carbon racers
else if(level == 15) { PlayerInfo[para1][pChar] = 270; } //GSfly
else if(level == 16) { PlayerInfo[para1][pChar] = 104; } //Ballas

if(level == 0)
{
    gTeam[para1] = 3;
    PlayerInfo[para1][pTeam] = 3;
}
else if(level == 1 || level == 2 || level == 3)
{
    gTeam[para1] = 2;
    PlayerInfo[para1][pTeam] = 2;
}
else if(level == 4)
{
    gTeam[para1] = 1;
    PlayerInfo[para1][pTeam] = 1;
}
else
{
    gTeam[para1] = 15;
    PlayerInfo[para1][pTeam] = 15;
}

    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);

    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, WHITE, "{FF4040}GRESKA:{FFFFFF}Neste ovlasteni da ja koristite ova komanda.");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
<a href="http://balkan-samp.com" title="Klikni da posjetis Balkan samp forum!" ><img src="http://balkan-samp.com/potpis/potpis.php?id=15426" ></a>

Probaj ovako nez jeli ti ispravno napravljeno
YCMD:makeleader(playerid, params[],help)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /makeleader [ID Igraca/Deo Imena] [Broj(1-17)]");
SendClientMessage(playerid, LIGHTRED, "|_____________________________________________________________|");
SendClientMessage(playerid, 0x33CCFFAA, "1.PD | 2.MBI | 3.ARM | 4.MD | 5.Yakuza | 6.LCN | 7. Hitman ");
SendClientMessage(playerid, 0x33CCFFAA, "8.Hitman | 9.Kanal-7 | 10.Taxi | 12.LSG | 15.GSF | 16. Ballas");
SendClientMessage(playerid, LIGHTRED, "|_____________________________________________________________|");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}Nemojte ispod 0 ili nad 17!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 5)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
            if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
            {
                SendClientMessage(playerid, COLOR_GREY, "{FF4040}GRESKA:{FFFFFF}Toj igrac e vo nekaoja organizacija(Kiknete go prvo od org za da ne problemi so radiroto)!");
                return 1;
            }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "{37F906}INFO:{FFFFFF} Promovirani ste vo lider od strata na Administartor%s", sendername);
SendClientMessage(para1, SVETLOPLAVA, string);
format(string, sizeof(string), "{37F906}INFO:{FFFFFF} Go postavivte %s da vodi {FFFFFF}| %d.", giveplayer,level);
SendClientMessage(playerid, SVETLOPLAVA, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; }
else if(level == 1) { PlayerInfo[para1][pChar] = 265; } //LS PD
else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //swat
else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //hitna
else if(level == 5) { PlayerInfo[para1][pChar] = 120; } //Yakuza
else if(level == 6) { PlayerInfo[para1][pChar] = 113; } //LCN
else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //gradonacelnik
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //hitman
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Novinari
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
else if(level == 13) { PlayerInfo[para1][pChar] = 292; } //surenos
else if(level == 14) { PlayerInfo[para1][pChar] = 21; } //carbon racers
else if(level == 15) { PlayerInfo[para1][pChar] = 270; } //GSfly
else if(level == 16) { PlayerInfo[para1][pChar] = 104; } //Ballas

if(level == 0)
{
    gTeam[para1] = 3;
    PlayerInfo[para1][pTeam] = 3;
}
else if(level == 1 || level == 2 || level == 3)
{
    gTeam[para1] = 2;
    PlayerInfo[para1][pTeam] = 2;
}
else if(level == 4)
{
    gTeam[para1] = 1;
    PlayerInfo[para1][pTeam] = 1;
}
else
{
    gTeam[para1] = 15;
    PlayerInfo[para1][pTeam] = 15;
}

    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);

    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, WHITE, "{FF4040}GRESKA:{FFFFFF}Neste ovlasteni da ja koristite ova komanda.");
}
}
return 1;
}

imao sam erora mnogu
<a href="http://balkan-samp.com" title="Klikni da posjetis Balkan samp forum!" ><img src="http://balkan-samp.com/potpis/potpis.php?id=15426" ></a>

Citat: Stefann Petrov poslato Avgust 27, 2013, 14:52:09 POSLE PODNE
imao sam erora mnogu

postavi ovdje errore, moguće i da nisi na vrh skripte definisao YCMD.
Poslednja Izmena: Avgust 27, 2013, 16:33:47 POSLE PODNE od ..::[Farkias]::..