Ne radi mi komanda ! Pomoc FAST

Započeo Jiky, Mart 08, 2019, 14:26:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

KAZE MI DA NEMOGU KORISTIT OVU KOMANDU PLZ HELP

if(strcmp(cmd, "/makeleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    new Playername[24];
        GetPlayerName(playerid, Playername, sizeof(Playername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
            if(strmatch("Martin_Salvatore", ImeIgraca(playerid)) || strmatch("Matthew_Espinosa", ImeIgraca(playerid)) || strmatch("Jack_Saly", ImeIgraca(playerid)) || strmatch("Terrone_Inzerillo", ImeIgraca(playerid)))
    {
        if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
            PlayerInfo[para1][pLeader] = 0;
            PlayerInfo[para1][pMember] = 0;
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
PlayerInfo[para1][pMember] = level;
PlayerInfo[para1][pRank] = 6;
format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
PlayerInfo[playerid][pReputacijaL] = 0;
if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
    PlayerInfo[para1][pTeam] = 11;
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
}
}
return 1;
}


Citat: v4yne1 poslato Mart 08, 2019, 14:31:24 POSLE PODNE
pa stavi sebi admina level 5 ili više
nece probo sam , imam i rcon i sve al nece

ahaaa..

nisi fino postavio provjeru

ide

[pawn]if(PlayerInfo[playerid][pAdmin] < 5)
{
    // kod
}
else return SendClientMessage(playerid, -1, "Ne mozes koristiti ovu komandu");[/pawn]

Citat: v4yne1 poslato Mart 08, 2019, 14:45:38 POSLE PODNE
ahaaa..

nisi fino postavio provjeru

ide

[pawn]if(PlayerInfo[playerid][pAdmin] < 5)
{
    // kod
}
else return SendClientMessage(playerid, -1, "Ne mozes koristiti ovu komandu");[/pawn]

aj mi posalji celi kod , nmg ovako da se snadjem

YCMD:postavilidera(playerid, params[],help)
{
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Ne mozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }
AKO ZNAS ZA BOGA I ZA GLAVU ZIVU NE BRANI MI DOKTORE RAKIJU I PIVU

Citat: Aggressive poslato Mart 08, 2019, 15:34:13 POSLE PODNE
YCMD:postavilidera(playerid, params[],help)
{
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Ne mozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }
ali u mojoj skripti cmd ne pocinju za ycmd , vidi :D

Izbrisi kod gde pise Martin_Salvatore ili umesto Martin_Salvatore stavi svoj nickname @Basovski