Jump to content

Question

Posted

Salutare...

Imi puteti spune si mie cum pot sa pun in gamemod ca atunci cand ma loghez la rcon sa am acces la /makeadmin. Ca eu cand bag rcon-u zice ca nu am acces la comanda :(

Dai si tu un vot aici http://concurs.ws/concurent-bRonx.html , nu dureaza decat 5 secunde .

4 answers to this question

Recommended Posts

Posted

Uite comanda /makeadmin,

if(strcmp(cmd, "/makeadmin", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /makeadmin [playerid/PartOfName] [level(1-3)]");

return 1;

}

new para1;

new level;

para1 = ReturnUser(tmp);

tmp = strtok(cmdtext, idx);

level = strval(tmp);

if (PlayerInfo[playerid][pAdmin] >= 1338)

{

    if(IsPlayerConnected(para1))

    {

        if(para1 != INVALID_PLAYER_ID)

        {

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

PlayerInfo[para1][pAdmin] = level;

printf("xStrike: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);

format(string, sizeof(string), "  You have been promoted to a level %d admin by %s", level, sendername);

SendClientMessage(para1, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "  You have promoted %s to a level %d admin.", giveplayer,level);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

  format(string, 128, "{FF2C00}AdmWarning: {33FF33}%s {FFFFFF}has set {33FF33}%s {FFFFFF}to a level {33FF33}%d {FFFFFF}admin.", sendername,giveplayer,level);

ABroadCast(COLOR_YELLOW,string,5);

}

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

}

}

return 1;

}

Dai si tu un vot aici http://concurs.ws/concurent-bRonx.html , nu dureaza decat 5 secunde .

Posted
if(strcmp(cmd, "/makeadmin", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /makeadmin [playerid/PartOfName] [level(1-3)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 1338 || IsPlayerAdmin(playerid) )
         {
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pAdmin] = level;
                  printf("xStrike: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
                  format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
                  SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                  format(string, sizeof(string), "   You have promoted %s to a level %d admin.", giveplayer,level);
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                     format(string, 128, "{FF2C00}AdmWarning: {33FF33}%s {FFFFFF}has set {33FF33}%s {FFFFFF}to a level {33FF33}%d {FFFFFF}admin.", sendername,giveplayer,level);
                  ABroadCast(COLOR_YELLOW,string,5);

               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
         }
      }
      return 1;
   }

Posted

if(strcmp(cmd, "/makeadmin", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /makeadmin [playerid/PartOfName] [level(1-3)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 1338 || IsPlayerAdmin(playerid) )
         {
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pAdmin] = level;
                  printf("xStrike: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
                  format(string, sizeof(string), "   You have been promoted to a level %d admin by %s", level, sendername);
                  SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                  format(string, sizeof(string), "   You have promoted %s to a level %d admin.", giveplayer,level);
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                     format(string, 128, "{FF2C00}AdmWarning: {33FF33}%s {FFFFFF}has set {33FF33}%s {FFFFFF}to a level {33FF33}%d {FFFFFF}admin.", sendername,giveplayer,level);
                  ABroadCast(COLOR_YELLOW,string,5);

               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
         }
      }
      return 1;
   }

Multumesc mult, a functionat. Daca nu te superi ai putea sa te uiti Aici ?

Dai si tu un vot aici http://concurs.ws/concurent-bRonx.html , nu dureaza decat 5 secunde .

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.