Szerző Téma: felvétel probléma  (Megtekintve 428 alkalommal)

felvétel probléma
« Dátum: 2016. március 07. - 20:33:47 »
0 Show voters
Sziasztok.
Egy olyan problémám van, mikor beírom, hogy /felveszfrakció mindig annyit ír ki, hogy unknown command..
Nemtudok rájönni hol rontottam el..
 
   if(strcmp(cmd, \"/felveszfrakció\", true) == 0 || strcmp(cmd, \"/felveszfrakcio\", true) == 0)
{
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 4)
    {
   if(IsPlayerConnected(playerid))
    {
           new para1;
      para1 = ReturnUser(tmp);
      if(PlayerInfo[para1][pLeader] == 0)
      {
           tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, \"Használat: /felveszfrakció [JátékosID/NévRészlet]\");
            return 1;
         }
         if (PlayerInfo[playerid][pLeader] == 1 || Admin(playerid, 7))
         {
            if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     if(PlayerInfo[para1][pMember] > 0)
                     {
                         SendClientMessage(playerid, COLOR_GREY, \"A játékosnak már van leaderes munkája!\");
                         return 1;
                     }
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pMember] = 1;
                  PlayerInfo[para1][pRank] = 1;
                  format(string, sizeof(string), \"%s felvett rendőrnek!\", sendername);
                  SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                  format(string, sizeof(string), \"Felvetted %s rendőrnek.\", rag(giveplayer,3));
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), \"%s felvette %s rendőrnek.\", sendername, rag(giveplayer,3));
                  SendFAdminMessage(COLOR_FOADMIN,string);
                  SetPlayerColor(para1, COLOR_GRAD2);
                  if(PlayerInfo[para1][pSex] == 1)
                  {
                     PlayerInfo[para1][Munkaruha1] = 280;
                     SetPlayerSkin(para1, 280);
                  }
                  if(PlayerInfo[para1][pSex] == 2)
                  {
                     PlayerInfo[para1][Munkaruha1] = 306;
                     SetPlayerSkin(para1,306);
                  }
                  new nev[32];
                  GetPlayerName(playerid, nev, sizeof(nev));
                  new h,mi,s,y,m,d;
                  getdate(y,m,d);
                  gettime(h,mi,s);
                      format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s felvette %s rendőrnek.\",y,m,d,h,mi,s,nev,rag(giveplayer,3));
                  LoOoG(stringx);
               }
            }
         }
         if (PlayerInfo[playerid][pLeader] == 4 || Admin(playerid, 7))
         {
            if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     if(PlayerInfo[para1][pMember] > 0)
                     {
                         SendClientMessage(playerid, COLOR_GREY, \"A játékosnak már van leaderes munkája!\");
                         return 1;
                     }
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pMember] = 4;
                  PlayerInfo[para1][pRank] = 1;
                  format(string, sizeof(string), \"%s felvett mentősnek!\", sendername);
                  SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                  format(string, sizeof(string), \"Felvetted %s mentősnek.\", rag(giveplayer,3));
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), \"%s felvette %s mentősnek.\", sendername, rag(giveplayer,3));
                  SendFAdminMessage(COLOR_FOADMIN,string);
                  SetPlayerColor(para1, COLOR_GRAD2);
                  if(PlayerInfo[para1][pSex] == 1)
                  {
                     PlayerInfo[para1][Munkaruha1] = 274;
                     SetPlayerSkin(para1,274);
                  }
                  if(PlayerInfo[para1][pSex] == 2)
                  {
                     PlayerInfo[para1][Munkaruha1] = 308;
                     SetPlayerSkin(para1,308);
                  }
                  new nev[32];
                  GetPlayerName(playerid, nev, sizeof(nev));
                  new h,mi,s,y,m,d;
                  getdate(y,m,d);
                  gettime(h,mi,s);
                      format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s felvette %s mentősnek.\",y,m,d,h,mi,s,nev,rag(giveplayer,3));
                  LoOoG(stringx);
               }
            }
         }
      } SendClientMessage(playerid, COLOR_GRAD2, \"Nem vagy frakció leader.\");
    }
} return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal