SHARE
TWEET

bG Commands

BR_Gustavo May 6th, 2020 (edited) 1,805 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //------------------------------------------------------------------------------
  2. CMD:setbg(playerid,params[])
  3. {
  4.     if(IsPlayerAdmin(playerid) || ContaInfo[playerid][bGMember] >= 13)
  5.     {
  6.         new ID,Nivel;
  7.         if(sscanf(params,"ud",ID,Nivel))return SendClientMessage(playerid,Vermelho,"USAGE: /SetbG [Player-ID] [Level]");
  8.         if(IsPlayerConnected(ID))
  9.         {
  10.             if(ContaInfo[ID][bGMember] != Nivel)
  11.             {
  12.                 if(Nivel >= 0 && Nivel <= 15)
  13.                 {
  14.                     new Consulta[150],Tempo[6],MsgFormat[150];
  15.                     getdate(Tempo[2],Tempo[1],Tempo[0]);
  16.                     gettime(Tempo[3],Tempo[4],Tempo[5]);
  17.                     format(Consulta,150,"SELECT * FROM `clan` WHERE `Nome` = '%s';",Nome(ID));
  18.                     mysql_query(MysqlDb,Consulta,true);
  19.                     if(cache_num_rows() == 0)
  20.                     {
  21.                         format(Consulta,150,"INSERT INTO clan (Nome) VALUES ('%s');",Nome(ID));
  22.                         mysql_query(MysqlDb,Consulta,false);
  23.                     }
  24.                     if(ContaInfo[ID][bGMember] < Nivel){ GameTextForPlayer(ID,"~g~]bG] LEVEL UP", 2000, 3); }else
  25.                     if(ContaInfo[ID][bGMember] > Nivel){ GameTextForPlayer(ID,"~r~]BG] LEVEL DOWN", 2000, 3); }
  26.  
  27.                     format(Consulta,150,"UPDATE `clan` SET `bG` = '%d' WHERE `Nome` = '%s';",Nivel,Nome(ID));
  28.                     mysql_query(MysqlDb,Consulta,false);
  29.  
  30.                     format(MsgFormat,150,"You have made %s [BG] Level %d on %d/%d/%d at %d:%d",Nome(ID),Nivel,Tempo[0],Tempo[1],Tempo[2],Tempo[3],Tempo[4]);
  31.                     SendClientMessage(playerid,AzulClaro,MsgFormat);
  32.                        
  33.                     format(MsgFormat,150,"%s has made %s [BG] Level %d on %d/%d/%d at %d:%d",Nome(playerid),Nome(ID),Nivel,Tempo[0],Tempo[1],Tempo[2],Tempo[3],Tempo[4]);
  34.                     SendClientMessage(ID,AzulClaro,MsgFormat);
  35.                    
  36.                     ContaInfo[ID][bGMember] = Nivel;
  37.                     ComandobG(playerid,"SETBG");
  38.  
  39.                 }else SendClientMessage(playerid,Vermelho,"ERROR: Max [bG] Level is 15");
  40.             }else SendClientMessage(playerid,Vermelho,"ERROR: This player is already on this level");
  41.         }else SendClientMessage(playerid,Vermelho,"ERROR: This player is not online.");
  42.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  43.     return 1;
  44. }
  45. //------------------------------------------------------------------------------
  46. CMD:settempbg(playerid,params[])
  47. {
  48.     if(IsPlayerAdmin(playerid) || ContaInfo[playerid][bGMember] >= 13)
  49.     {
  50.         new ID,Nivel;
  51.         if(sscanf(params,"ud",ID,Nivel))return SendClientMessage(playerid,Vermelho,"USAGE: /SetTempbG [Player-ID] [Level]");
  52.         if(IsPlayerConnected(ID))
  53.         {
  54.             if(ContaInfo[ID][bGMember] != Nivel)
  55.             {
  56.                 if(Nivel >= 0 && Nivel <= 15)
  57.                 {
  58.                     new Tempo[6],MsgFormat[150];
  59.                     getdate(Tempo[2],Tempo[1],Tempo[0]);
  60.                     gettime(Tempo[3],Tempo[4],Tempo[5]);
  61.  
  62.                     if(ContaInfo[ID][bGMember] < Nivel){ GameTextForPlayer(ID,"~g~]bG] LEVEL TEMP UP", 2000, 3); }else
  63.                     if(ContaInfo[ID][bGMember] > Nivel){ GameTextForPlayer(ID,"~r~]BG] LEVEL TEMP DOWN", 2000, 3); }
  64.  
  65.                     format(MsgFormat,150,"You have made %s [BG] temp Level %d on %d/%d/%d at %d:%d",Nome(ID),Nivel,Tempo[0],Tempo[1],Tempo[2],Tempo[3],Tempo[4]);
  66.                     SendClientMessage(playerid,AzulClaro,MsgFormat);
  67.  
  68.                     format(MsgFormat,150,"%s has made %s [BG] temp Level %d on %d/%d/%d at %d:%d",Nome(playerid),Nome(ID),Nivel,Tempo[0],Tempo[1],Tempo[2],Tempo[3],Tempo[4]);
  69.                     SendClientMessage(ID,AzulClaro,MsgFormat);
  70.  
  71.                     ContaInfo[ID][bGMember] = Nivel;
  72.                     ComandobG(playerid,"SETTEMPBG");
  73.  
  74.                 }else SendClientMessage(playerid,Vermelho,"ERROR: Max [bG] Level is 15");
  75.             }else SendClientMessage(playerid,Vermelho,"ERROR: This player is already on this level");
  76.         }else SendClientMessage(playerid,Vermelho,"ERROR: This player is not online.");
  77.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  78.     return 1;
  79. }
  80. //------------------------------------------------------------------------------
  81. CMD:osetbg(playerid,params[])
  82. {
  83.     if(IsPlayerAdmin(playerid) || ContaInfo[playerid][bGMember] >= 13)
  84.     {
  85.         new MsgFormat[120],Consulta[120],Conta[100],Nivel;
  86.         if(sscanf(params,"s[100]d",Conta,Nivel))return SendClientMessage(playerid,Vermelho,"USAGE: /OSetbG [Account-Name] [Level]");
  87.         format(Consulta,120,"SELECT * FROM `contas` WHERE `Nome` LIKE '%%%s%%';",Conta);
  88.         mysql_query(MysqlDb,Consulta,true);
  89.         if(cache_num_rows() > 1)
  90.         {
  91.             new VariosNomes[150];
  92.             for(new i=0; i<cache_num_rows(); i++)
  93.             {
  94.                 cache_get_value(i,"Nome",Conta,100);
  95.                 format(Consulta,120,"%s, ",Conta);
  96.                 strcat(VariosNomes,Consulta);
  97.             }
  98.             SendClientMessage(playerid,Amarelo,"We found many accounts with that nick, please choose one and enter the full nick.");
  99.             SendClientMessage(playerid,Amarelo,VariosNomes);
  100.         }else
  101.         if(cache_num_rows() >= 1)
  102.         {
  103.             cache_get_value(0,"Nome",Conta,100);
  104.             format(Consulta,120,"SELECT * FROM `clan` WHERE `Nome` = '%s';",Conta);
  105.             mysql_query(MysqlDb,Consulta,true);
  106.            
  107.             if(cache_num_rows() == 0)
  108.             {
  109.                 format(Consulta,120,"INSERT INTO clan (Nome) VALUES ('%s');",Conta);
  110.                 mysql_query(MysqlDb,Consulta,false);
  111.             }
  112.             format(Consulta,120,"UPDATE `clan` SET `bG` = '%d' WHERE `Nome` = '%s';",Nivel,Conta);
  113.             mysql_query(MysqlDb,Consulta,false);
  114.        
  115.             format(MsgFormat,120,"The level of \"%s\" has been successfully update to: (%d)!",Conta,Nivel);
  116.             SendClientMessage(playerid,AzulClaro,MsgFormat);
  117.             ComandobG(playerid,"OSETLEVEL");
  118.            
  119.             foreach(new i: Player)
  120.             {
  121.                 if(!strcmp(Nome(i),Conta,false))
  122.                 {
  123.                     ContaInfo[i][bGMember] = Nivel;
  124.                     format(MsgFormat,120,"%s has made %s [BG] Level %d",Nome(playerid),Nome(i),Nivel);
  125.                     SendClientMessage(i,AzulClaro,MsgFormat);
  126.                 }
  127.             }
  128.         }else
  129.         if(cache_num_rows() == 0)return SendClientMessage(playerid,Vermelho,"ERROR: This username not exist on database!");
  130.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  131.     return 1;
  132. }
  133. //------------------------------------------------------------------------------
  134. CMD:bgmembers(playerid,params[])
  135. {
  136.     new Cor = 0x00FF00AA,Nivel[100],Contar=0;
  137.    
  138.     SendClientMessage(playerid, 0x00FF00AA, " ");
  139.     SendClientMessage(playerid, 0x00FF00AA, "____________ |- Online [bG]  Members -| _____________");
  140.     SendClientMessage(playerid, 0x00FF00AA, " ");
  141.    
  142.     foreach(new bG: Player)
  143.     {
  144.         if(ContaInfo[bG][bGMember] >= 1)
  145.         {
  146.             Contar++;
  147.             switch (ContaInfo[bG][bGMember])
  148.             {
  149.                 case 1: { Nivel = "Soldier"; Cor = 0x00FF00AA;}
  150.                 case 2: { Nivel = "Cable"; Cor =    0x00FF00AA; }
  151.                 case 3: { Nivel = "Seargeant"; Cor =    0x00FF00AA; }
  152.                 case 4: { Nivel = "Master-Seargeant"; Cor =     0x00FF00AA; }
  153.                 case 5: { Nivel = "Deputy"; Cor =   0x00FF00AA; }
  154.                 case 6: { Nivel = "Lieutenant"; Cor =   0x007900AA; }
  155.                 case 7: { Nivel = "Captain"; Cor =  0x007900AA; }
  156.                 case 8: { Nivel = "Major"; Cor =    0x007900AA; }
  157.                 case 9: { Nivel = "Supreme-Major"; Cor =    0x007900AA; }
  158.                 case 10: { Nivel = "Lieutenant-Colonel"; Cor =  0x007900AA; }
  159.                 case 11: { Nivel = "Colonel"; Cor =     0x007900AA; }
  160.                 case 12: { Nivel = "Co-Leader"; Cor = 0xFF0000AA; }
  161.                 case 13: { Nivel = "Leader"; Cor= 0xFF0000AA; }
  162.                 case 14: { Nivel = "Manager"; Cor = 0x808080AA; }
  163.                 case 15: { Nivel = "President"; Cor = 0x808080AA; }
  164.             }
  165.             if(Contar >= 1)
  166.             {
  167.                 new MsgFormat[120],Dutty[20];
  168.                 if(ContaInfo[bG][OnDuty] == 0) Dutty = "{FF0000}Off Duty";
  169.                 if(ContaInfo[bG][OnDuty] == 1) Dutty = "{00FF00}On Duty";
  170.                 if(ContaInfo[bG][OnDuty] == 2) Dutty = "{FF0000}AFK";
  171.                
  172.                 format(MsgFormat,120,"Rank: %d - %s   (Id:%i) | %s | %s",ContaInfo[bG][bGMember],Nome(bG),bG,Nivel,Dutty);
  173.                 SendClientMessage(playerid,Cor,MsgFormat);
  174.             }
  175.         }
  176.     }
  177.     if(Contar == 0)SendClientMessage(playerid,Vermelho,"No online bG Members");
  178.     SendClientMessage(playerid,0x00FF00AA, "_________________________________________________");
  179.     return 1;
  180. }
  181. //------------------------------------------------------------------------------
  182. CMD:bgweaps(playerid,params[])
  183. {
  184.     if(ContaInfo[playerid][bGMember] >=1)
  185.     {
  186.         if(IsPlayerModoDM(playerid))
  187.         {
  188.             new MsgFormat[120];
  189.             format(MsgFormat,120,"[bGboT] {32CD32}'%s' CMD has used /bgweaps",Nome(playerid));
  190.             SendClientMessageToAll(0xFF0000FF,MsgFormat);
  191.             ComandobG(playerid,"BGWEAPS");
  192.            
  193.             PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  194.             GivePlayerWeapon(playerid,24,9999); GivePlayerWeapon(playerid,42,9999);
  195.             GivePlayerWeapon(playerid,16,9999); GivePlayerWeapon(playerid,29,9999);
  196.             GivePlayerWeapon(playerid,25,9999); GivePlayerWeapon(playerid,33,9999);
  197.             GivePlayerWeapon(playerid,31,9999); GivePlayerWeapon(playerid,7,99999);
  198.  
  199.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  200.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  201.     return 1;
  202. }
  203. //------------------------------------------------------------------------------
  204. CMD:bgweaps1(playerid,params[])
  205. {
  206.     if(ContaInfo[playerid][bGMember] >=1)
  207.     {
  208.         if(IsPlayerModoDM(playerid))
  209.         {
  210.             new MsgFormat[120];
  211.             format(MsgFormat,120,"[bGboT] {32CD32}'%s' CMD has used /bgweaps1",Nome(playerid));
  212.             SendClientMessageToAll(0xFF0000FF,MsgFormat);
  213.             ComandobG(playerid,"BGWEAPS1");
  214.  
  215.             PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  216.             GivePlayerWeapon(playerid,17,9999); GivePlayerWeapon(playerid,28,9999);
  217.             GivePlayerWeapon(playerid,18,9999); GivePlayerWeapon(playerid,32,9999);
  218.             GivePlayerWeapon(playerid,43,9999); GivePlayerWeapon(playerid,34,9999);
  219.             GivePlayerWeapon(playerid,9, 9999); GivePlayerWeapon(playerid,46,9999);
  220.  
  221.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  222.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  223.     return 1;
  224. }
  225. //------------------------------------------------------------------------------
  226. CMD:bgc(playerid,params[])
  227. {
  228.     if(ContaInfo[playerid][bGMember] >=2)
  229.     {
  230.         if(IsPlayerModoDM(playerid))
  231.         {
  232.             new Cor,MsgFormat[5];
  233.             if(sscanf(params,"d",Cor))return SendClientMessage(playerid,Vermelho,"USAGE: /bGC [1/2/3/4/5]");
  234.            
  235.             switch (Cor)
  236.             {
  237.                 case 1:{ SetPlayerColor(playerid,0xFFFFFFAA); SendClientMessage(playerid,0xFFFFFFAA,"You changed your color."); }
  238.                 case 2:{ SetPlayerColor(playerid,0x800080AA); SendClientMessage(playerid,0x800080AA,"You changed your color."); }
  239.                 case 3:{ SetPlayerColor(playerid,0x00FF00AA); SendClientMessage(playerid,0x00FF00AA,"You changed your color."); }
  240.                 case 4:{ SetPlayerColor(playerid,0x007BB7AA); SendClientMessage(playerid,0x007BB7AA,"You changed your color."); }
  241.                 case 5:{ SetPlayerColor(playerid,0xFF0000AA); SendClientMessage(playerid,0xFF0000AA,"You changed your color."); }
  242.                 default:{ return SendClientMessage(playerid,Vermelho,"USAGE: /bGC [1/2/3/4/5]"); }
  243.             }
  244.             format(MsgFormat,5,"BGC%d",Cor);
  245.             ComandobG(playerid,MsgFormat);
  246.            
  247.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  248.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  249.     return 1;
  250. }
  251. //------------------------------------------------------------------------------
  252. CMD:bgskin(playerid,params[])
  253. {
  254.     if(ContaInfo[playerid][bGMember] >=1)
  255.     {
  256.         if(IsPlayerModoDM(playerid))
  257.         {
  258.             new Skins,MsgFormat[5];
  259.             if(sscanf(params,"d",Skins))return SendClientMessage(playerid,Vermelho,"USAGE: /bGSkin [1/2/3/4/5/6]");
  260.  
  261.             switch (Skins)
  262.             {
  263.                 case 1:{ SetPlayerSkin(playerid,83); SendClientMessage(playerid,0xFFFFFFAA,"You changed your skin."); }
  264.                 case 2:{ SetPlayerSkin(playerid,29); SendClientMessage(playerid,0x800080AA,"You changed your skin."); }
  265.                 case 3:{ SetPlayerSkin(playerid,164); SendClientMessage(playerid,0x00FF00AA,"You changed your skin."); }
  266.                 case 4:{ SetPlayerSkin(playerid,174); SendClientMessage(playerid,0x007BB7AA,"You changed your skin."); }
  267.                 case 5:{ SetPlayerSkin(playerid,181); SendClientMessage(playerid,0xFF0000AA,"You changed your skin."); }
  268.                 case 6:{ SetPlayerSkin(playerid,292); SendClientMessage(playerid,0xFF0000AA,"You changed your skin."); }
  269.                 default:{ return SendClientMessage(playerid,Vermelho,"USAGE: /bGSkin [1/2/3/4/5/6]"); }
  270.             }
  271.             format(MsgFormat,5,"BGSKIN%d",Skins);
  272.             ComandobG(playerid,MsgFormat);
  273.  
  274.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  275.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  276.     return 1;
  277. }
  278. //------------------------------------------------------------------------------
  279. CMD:bgbase(playerid,params[])
  280. {
  281.     if(ContaInfo[playerid][bGMember] >=1)
  282.     {
  283.         if(IsPlayerModoDM(playerid))
  284.         {
  285.             ComandobG(playerid,"BGBASE");
  286.             Teleportar(playerid,873.5886,394.1767,20.4535,0,0,0,"BlackGreen Base","bgbase",AzulClaro);
  287.            
  288.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  289.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  290.     return 1;
  291. }
  292. //------------------------------------------------------------------------------
  293. CMD:bgsay(playerid,params[])
  294. {
  295.     if(ContaInfo[playerid][bGMember] >=1)
  296.     {
  297.         new Texto[100],MsgFormat[120],Nivel[40],Cor;
  298.         if(sscanf(params,"s[100]",Texto))return SendClientMessage(playerid,Vermelho,"USAGE: /bGSay [Text]");
  299.         switch (ContaInfo[playerid][bGMember])
  300.         {
  301.             case 1: { Nivel = "Soldier"; Cor = 0x00FF00AA;}
  302.             case 2: { Nivel = "Cable"; Cor =    0x00FF00AA; }
  303.             case 3: { Nivel = "Seargeant"; Cor =    0x00FF00AA; }
  304.             case 4: { Nivel = "Master-Seargeant"; Cor =     0x00FF00AA; }
  305.             case 5: { Nivel = "Deputy"; Cor =   0x00FF00AA; }
  306.             case 6: { Nivel = "Lieutenant"; Cor =   0x007900AA; }
  307.             case 7: { Nivel = "Captain"; Cor =  0x007900AA; }
  308.             case 8: { Nivel = "Major"; Cor =    0x007900AA; }
  309.             case 9: { Nivel = "Supreme-Major"; Cor =    0x007900AA; }
  310.             case 10: { Nivel = "Lieutenant-Colonel"; Cor =  0x007900AA; }
  311.             case 11: { Nivel = "Colonel"; Cor =     0x007900AA; }
  312.             case 12: { Nivel = "Co-Leader"; Cor = 0xFF0000AA; }
  313.             case 13: { Nivel = "Leader"; Cor= 0xFF0000AA; }
  314.             case 14: { Nivel = "Manager"; Cor = 0x808080AA; }
  315.             case 15: { Nivel = "President"; Cor = 0x808080AA; }
  316.         }
  317.         format(MsgFormat,120,"***%s %s:{FF0000} %s",Nivel,Nome(playerid),Texto);
  318.         SendClientMessageToAll(Cor,MsgFormat);
  319.        
  320.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  321.     return 1;
  322. }
  323. //------------------------------------------------------------------------------
  324. CMD:bg(playerid,params[])
  325. {
  326.     if(ContaInfo[playerid][bGMember] >=1)
  327.     {
  328.         new Texto[100],MsgFormat[120],Nivel[40],Cor;
  329.         if(sscanf(params,"s[100]",Texto))return SendClientMessage(playerid,Vermelho,"USAGE: /bG [Text]");
  330.         switch (ContaInfo[playerid][bGMember])
  331.         {
  332.             case 1: { Nivel = "Soldier"; Cor = 0x00FF00AA;}
  333.             case 2: { Nivel = "Cable"; Cor =    0x00FF00AA; }
  334.             case 3: { Nivel = "Seargeant"; Cor =    0x00FF00AA; }
  335.             case 4: { Nivel = "Master-Seargeant"; Cor =     0x00FF00AA; }
  336.             case 5: { Nivel = "Deputy"; Cor =   0x00FF00AA; }
  337.             case 6: { Nivel = "Lieutenant"; Cor =   0x007900AA; }
  338.             case 7: { Nivel = "Captain"; Cor =  0x007900AA; }
  339.             case 8: { Nivel = "Major"; Cor =    0x007900AA; }
  340.             case 9: { Nivel = "Supreme-Major"; Cor =    0x007900AA; }
  341.             case 10: { Nivel = "Lieutenant-Colonel"; Cor =  0x007900AA; }
  342.             case 11: { Nivel = "Colonel"; Cor =     0x007900AA; }
  343.             case 12: { Nivel = "Co-Leader"; Cor = 0xFF0000AA; }
  344.             case 13: { Nivel = "Leader"; Cor= 0xFF0000AA; }
  345.             case 14: { Nivel = "Manager"; Cor = 0x808080AA; }
  346.             case 15: { Nivel = "President"; Cor = 0x808080AA; }
  347.         }
  348.         format(MsgFormat,120,"[bG]%s %s:{32CD32} %s",Nivel,Nome(playerid),Texto);
  349.  
  350.         foreach(new bG: Player)
  351.         {
  352.             if(ContaInfo[bG][bGMember] >=1)
  353.             {
  354.                 SendClientMessage(bG,Cor,MsgFormat);
  355.             }
  356.         }
  357.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  358.     return 1;
  359. }
  360. //------------------------------------------------------------------------------
  361. CMD:bgann(playerid,params[])
  362. {
  363.     if(ContaInfo[playerid][bGMember] >=7)
  364.     {
  365.         new Texto[100];
  366.         if(sscanf(params,"s[100]",Texto))return SendClientMessage(playerid,Vermelho,"USAGE: /bGAnn [Texto]");
  367.         ComandobG(playerid,"BGANN");
  368.  
  369.         foreach(new bG: Player)
  370.         {
  371.             if(ContaInfo[bG][bGMember] >=1)
  372.             {
  373.                 PlayerPlaySound(bG,1057,0.0,0.0,0.0);
  374.                 GameTextForPlayer(bG,Texto, 4000, 3);
  375.             }
  376.         }
  377.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  378.     return 1;
  379. }
  380. //------------------------------------------------------------------------------
  381. CMD:bgafk(playerid,params[])
  382. {
  383.     if(ContaInfo[playerid][bGMember] >=1)
  384.     {
  385.         if(IsPlayerModoDM(playerid))
  386.         {
  387.             if(ContaInfo[playerid][OnDuty] != 2)
  388.             {
  389.                 new Nivel[25],MsgFormat[150];
  390.                 switch (ContaInfo[playerid][bGMember])
  391.                 {
  392.                     case 1: { Nivel = "Soldier"; }
  393.                     case 2: { Nivel = "Cable"; }
  394.                     case 3: { Nivel = "Seargeant"; }
  395.                     case 4: { Nivel = "Master-Seargeant"; }
  396.                     case 5: { Nivel = "Deputy"; }
  397.                     case 6: { Nivel = "Lieutenant"; }
  398.                     case 7: { Nivel = "Captain"; }
  399.                     case 8: { Nivel = "Major"; }
  400.                     case 9: { Nivel = "Supreme-Major"; }
  401.                     case 10: { Nivel = "Lieutenant-Colonel"; }
  402.                     case 11: { Nivel = "Colonel"; }
  403.                     case 12: { Nivel = "Co-Leader"; }
  404.                     case 13: { Nivel = "Leader"; }
  405.                     case 14: { Nivel = "Manager"; }
  406.                     case 15: { Nivel = "President"; }
  407.                 }
  408.                 ContaInfo[playerid][OnDuty] = 2;
  409.                 TogglePlayerControllable(playerid,0);
  410.                 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  411.  
  412.                 format(MsgFormat,150,"[bG]%s {00FF7F}%s {006400}Now it's no longer available in the team.{FF0000}(/bGafk)",Nivel,Nome(playerid));
  413.                 SendClientMessageToAll(0x228B22FF,MsgFormat);
  414.  
  415.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already AFK!");
  416.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  417.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  418.     return 1;
  419. }
  420. //------------------------------------------------------------------------------
  421. CMD:bgback(playerid,params[])
  422. {
  423.     if(ContaInfo[playerid][bGMember] >=1)
  424.     {
  425.         if(IsPlayerModoDM(playerid))
  426.         {
  427.             if(ContaInfo[playerid][OnDuty] == 2)
  428.             {
  429.                 new Nivel[25],MsgFormat[150];
  430.                 switch (ContaInfo[playerid][bGMember])
  431.                 {
  432.                     case 1: { Nivel = "Soldier"; }
  433.                     case 2: { Nivel = "Cable"; }
  434.                     case 3: { Nivel = "Seargeant"; }
  435.                     case 4: { Nivel = "Master-Seargeant"; }
  436.                     case 5: { Nivel = "Deputy"; }
  437.                     case 6: { Nivel = "Lieutenant"; }
  438.                     case 7: { Nivel = "Captain"; }
  439.                     case 8: { Nivel = "Major"; }
  440.                     case 9: { Nivel = "Supreme-Major"; }
  441.                     case 10: { Nivel = "Lieutenant-Colonel"; }
  442.                     case 11: { Nivel = "Colonel"; }
  443.                     case 12: { Nivel = "Co-Leader"; }
  444.                     case 13: { Nivel = "Leader"; }
  445.                     case 14: { Nivel = "Manager"; }
  446.                     case 15: { Nivel = "President"; }
  447.                 }
  448.                 ContaInfo[playerid][OnDuty] = 1;
  449.                 TogglePlayerControllable(playerid,1);
  450.                 PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  451.  
  452.                 format(MsgFormat,150,"[bG]%s {00FF7F}%s {006400}Just got back to the staff! {00FF00}(/bGback)",Nivel,Nome(playerid));
  453.                 SendClientMessageToAll(0x228B22FF,MsgFormat);
  454.  
  455.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are not AFK!");
  456.         }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  457.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  458.     return 1;
  459. }
  460. //------------------------------------------------------------------------------
  461. CMD:bgbike(playerid,params[])
  462. {
  463.     if(IsPlayerModoDM(playerid))
  464.     {
  465.         if(ContaInfo[playerid][bGMember] >=1)
  466.         {
  467.             if(!IsPlayerInAnyVehicle(playerid))
  468.             {
  469.                 ComandobG(playerid,"BGBIKE");
  470.                 CriarCarroTemp(playerid,522,0,0);
  471.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already in a vehicle.");
  472.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  473.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  474.     return 1;
  475. }
  476. //------------------------------------------------------------------------------
  477. CMD:bgboat(playerid,params[])
  478. {
  479.     if(IsPlayerModoDM(playerid))
  480.     {
  481.         if(ContaInfo[playerid][bGMember] >=1)
  482.         {
  483.             if(!IsPlayerInAnyVehicle(playerid))
  484.             {
  485.                 ComandobG(playerid,"BGBOAT");
  486.                 CriarCarroTemp(playerid,493,0,0);
  487.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already in a vehicle.");
  488.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  489.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  490.     return 1;
  491. }
  492. //------------------------------------------------------------------------------
  493. CMD:bghydra(playerid,params[])
  494. {
  495.     if(IsPlayerModoDM(playerid))
  496.     {
  497.         if(ContaInfo[playerid][bGMember] >=1)
  498.         {
  499.             if(!IsPlayerInAnyVehicle(playerid))
  500.             {
  501.                 ComandobG(playerid,"BGHYDRA");
  502.                 CriarCarroTemp(playerid,520,0,0);
  503.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already in a vehicle.");
  504.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  505.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  506.     return 1;
  507. }
  508. //------------------------------------------------------------------------------
  509. CMD:bghunter(playerid,params[])
  510. {
  511.     if(IsPlayerModoDM(playerid))
  512.     {
  513.         if(ContaInfo[playerid][bGMember] >=1)
  514.         {
  515.             if(!IsPlayerInAnyVehicle(playerid))
  516.             {
  517.                 ComandobG(playerid,"BGHUNTER");
  518.                 CriarCarroTemp(playerid,425 ,0,0);
  519.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already in a vehicle.");
  520.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  521.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  522.     return 1;
  523. }
  524. //------------------------------------------------------------------------------
  525. CMD:bgrhino(playerid,params[])
  526. {
  527.     if(IsPlayerModoDM(playerid))
  528.     {
  529.         if(ContaInfo[playerid][bGMember] >=1)
  530.         {
  531.             if(!IsPlayerInAnyVehicle(playerid))
  532.             {
  533.                 ComandobG(playerid,"BGRHINO");
  534.                 CriarCarroTemp(playerid,432 ,0,0);
  535.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already in a vehicle.");
  536.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  537.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  538.     return 1;
  539. }
  540. //------------------------------------------------------------------------------
  541. CMD:bgcar(playerid,params[])
  542. {
  543.     if(IsPlayerModoDM(playerid))
  544.     {
  545.         if(ContaInfo[playerid][bGMember] >=1)
  546.         {
  547.             if(!IsPlayerInAnyVehicle(playerid))
  548.             {
  549.                 new ID,MsgFormat[20];
  550.                 if(sscanf(params,"d",ID))return SendClientMessage(playerid,Vermelho,"USAGE: /bGCar [1/2/3/4/5/6]");
  551.                 switch(ID)
  552.                 {
  553.                     case 1:{ CriarCarroTemp(playerid,451,0,0);}
  554.                     case 2:{ CriarCarroTemp(playerid,541,0,0);}
  555.                     case 3:{ CriarCarroTemp(playerid,411,0,0);}
  556.                     case 4:{ CriarCarroTemp(playerid,477,0,0);}
  557.                     case 5:{ CriarCarroTemp(playerid,559,0,0);}
  558.                     case 6:{ CriarCarroTemp(playerid,560,0,0);}
  559.                     default:{ return SendClientMessage(playerid,Vermelho,"USAGE: /bGCar [1/2/3/4/5/6]");}
  560.                 }
  561.                 format(MsgFormat,20,"BGCAR%d",ID);
  562.                 ComandobG(playerid,MsgFormat);
  563.                
  564.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are already in a vehicle.");
  565.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  566.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  567.     return 1;
  568. }
  569. //------------------------------------------------------------------------------
  570. CMD:bgtune(playerid,params[])
  571. {
  572.     if(IsPlayerModoDM(playerid))
  573.     {
  574.         if(ContaInfo[playerid][bGMember] >=1)
  575.         {
  576.             if(IsPlayerInAnyVehicle(playerid))
  577.             {
  578.                 switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
  579.                 {
  580.                     case 448,461,462,463,468,471,509,510,521,522,523,581,586,449:
  581.                     return SendClientMessage(playerid,Vermelho,"ERROR: You can not tune this vehicle");
  582.                 }
  583.                 ComandobG(playerid,"BGTUNE");
  584. //              RepairVehicle(GetPlayerVehicleID(playerid));
  585. //              SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
  586.  
  587.             }else SendClientMessage(playerid,Vermelho,"ERROR: You are not in a vehicle.");
  588.         }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  589.     }else SendClientMessage(playerid,Vermelho,"ERROR: You are in Zombie mode and can not execute this command.");
  590.     return 1;
  591. }
  592. //------------------------------------------------------------------------------
  593. CMD:bghelp(playerid,params[])
  594. {
  595.     if(ContaInfo[playerid][bGMember] >=1)
  596.     {
  597.         new bGHelp[1350];
  598.         strcat(bGHelp,"\n--------------= bG Commands =--------------");
  599.         strcat(bGHelp,"\n\n{00FF00}/bgmembers{FFFFFF}(shows all the members online)");
  600.         strcat(bGHelp,"\n{00FF00}/bgbase{FFFFFF} (teleports you to bG base)");
  601.         strcat(bGHelp,"\n{00FF00}/bgweaps | {00FF00}/bgweaps {FFFFFF} (Give bG Weapons)");
  602.         strcat(bGHelp,"\n{00FF00}/bgskin | /bgskin [1/2/3/4/5/6]{FFFFFF} (bG Skin)");
  603.         strcat(bGHelp,"\n{00FF00}/bgc [1/2/3/4/5/6]{FFFFFF} (Gives you bG color)");
  604.         strcat(bGHelp,"\n{00FF00}/bgh {FFFFFF}(Tells what help you need!) | {00FF00}/bg {FFFFFF}(bG private chat )");
  605.         strcat(bGHelp,"\n{00FF00}/bgafk {FFFFFF}(bG afk) and {00FF00}/bgback {FFFFFF}(bG back)");
  606.         strcat(bGHelp,"\n{FFFF00}\nVehicles provided by the clan\n");
  607.         strcat(bGHelp,"\n{00FF00}/bgbike {FFFFFF}(bG bike) | {00FF00}/bgboat {FFFFFF}(bG boat) | {00FF00}/bghunter {FFFFFF}(bG hunter) | {00FF00}/bghydra {FFFFFF}(bG hydra | {00FF00}/bgrhino {FFFFFF}(bG rhino)");
  608.         strcat(bGHelp,"\n{00FF00}/bgcar 1 {FFFFFF}(bG car Turismo) | {00FF00}/bgcar 2 {FFFFFF}(bG car Bullet) | {00FF00}/bgcar 3 {FFFFFF}(bG Infernus) | {00FF00}/bgcar 4 {FFFFFF}(bG car Hustler | {00FF00}/bgcar 5 {FFFFFF}(bG car Jester)| {00FF00}/bgcar 6 {FFFFFF}(bG car Sultan)\n");
  609.         strcat(bGHelp,"\n{00FF00}/bgtune {FFFFFF}(Tune your car bG)");
  610.         strcat(bGHelp,"\n{00FF00}/bggoto(DESACTIVED) {FFFFFF}(goto bG members) | {00FF00}/bgget(DESACTIVED) {FFFFFF}(Get bG members)");
  611.         strcat(bGHelp,"\n{00FF00}/bgsay {FFFFFF}(bG public Say) | {00FF00}/bgannounce {FFFFFF}(bG Announce)");
  612.         strcat(bGHelp,"\n{00FF00}/setbg {FFFFFF}(Allown leader to give bG Rank)");
  613.         strcat(bGHelp,"{00FF00}/settempbg {FFFFFF}(Allown leader to give temp bG Rank");
  614.         strcat(bGHelp,"\n{00FF00}/osetbg {FFFFFF}(Only owner or top clan rank)");
  615.         strcat(bGHelp,"\n{6B8E23}\nClan created by [bG]BlackGreen Owner [bG]");
  616.         ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"BG Commands",bGHelp,"Ok","");
  617.     }else SendClientMessage(playerid,Vermelho,"ERROR: You don't have enough level in the bG clan to use this command.");
  618.     return 1;
  619. }
  620.  
  621. forward ComandobG(playerid,Cmd[]);
  622. public ComandobG(playerid,Cmd[])
  623. {
  624.     if(ContaInfo[playerid][bGMember] >=1)
  625.     {
  626.         new MsgbG[128],MsgIrc[128],MsgDiscord[128];
  627.         format(MsgIrc,128,"70[INFO bG] '%s' (Level: %d)| Command: %s",Nome(playerid),ContaInfo[playerid][bGMember],Cmd);
  628.         format(MsgbG,128,"[INFO bG]: {00FF00}'%s' (Level: %d) | Command: %s",Nome(playerid),ContaInfo[playerid][bGMember],Cmd);
  629.         format(MsgDiscord,128,"[INFO bG] '%s' (Level: %d)| Command: %s",Nome(playerid),ContaInfo[playerid][bGMember],Cmd);
  630.         IRC_GroupSay(GrupoZS,DMOPERCANAL,MsgIrc);
  631.         DCC_SendChannelMensagem(bGDiscord,MsgDiscord);
  632.         foreach(new bG: Player)
  633.         {
  634.             if(IsPlayerConnected(bG) && ContaInfo[bG][bGMember] >=1)
  635.             {
  636.                 SendClientMessage(bG,Vermelho,MsgbG);
  637.             }
  638.         }
  639.     }
  640.     return 1;
  641. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top