Guest User

[Ajuda] CMD , SA-MP FORUMS

a guest
Nov 12th, 2011
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.14 KB | None | 0 0
  1.  
  2.  
  3.     if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
  4.     {
  5.         if(IsPlayerConnected(playerid))
  6.         {
  7.             if(PlayerInfo[playerid][pAdmin] == 0)
  8.             {
  9.                 SendClientMessage(playerid, COLOR_GREY, "   Você não é um Admin!");
  10.                 return 1;
  11.             }
  12.             if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  13.             {
  14.                 SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  15.                 return 1;
  16.             }
  17.             GetPlayerName(playerid, sendername, sizeof(sendername));
  18.             new length = strlen(cmdtext);
  19.             while ((idx < length) && (cmdtext[idx] <= ' '))
  20.             {
  21.                 idx++;
  22.             }
  23.             new offset = idx;
  24.             new result[64];
  25.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  26.             {
  27.                 result[idx - offset] = cmdtext[idx];
  28.                 idx++;
  29.             }
  30.             result[idx - offset] = EOS;
  31.             if(!strlen(result))
  32.             {
  33.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: (/av)isar [texto]");
  34.                 return 1;
  35.             }
  36.             if(TentouDivulgar(result))
  37.             {
  38.                 if(cdivulgar[playerid] >= 6)
  39.                 {
  40.                     SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui você não pode anunciar servidores!");
  41.                     SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor é uma merda, não divulgue-o aqui!");
  42.                     SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server também, uaheuhaeuhaeahe!");
  43.                     PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  44.                     Kick(playerid);
  45.                 }
  46.                 GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  47.                 format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
  48.                 ABroadCast(COLOR_YELLOW,string,1);
  49.                 DivulgouLog(string);
  50.                 cdivulgar[playerid] += 1;
  51.                 return 1;
  52.             }
  53.             SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso Da Administração ______________|");
  54.             if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  55.             {
  56.                 format(string, sizeof(string), "Admin BooT_VirtuaL: %s", result);
  57.                 SendClientMessageToAll(0x33FF00FF, string);
  58.             }
  59.             else
  60.             {
  61.                 format(string, sizeof(string), "Admin %s: %s", sendername, result);
  62.                 SendClientMessageToAll(0x33FF00FF, string);
  63.             }
  64.         }
  65.         return 1;
  66.     }
  67.  
  68. -----------------------------------------
  69.     if(strcmp(cmd, "/ir", true) == 0)
  70.     {
  71.         if(IsPlayerConnected(playerid))
  72.         {
  73.             tmp = strtok(cmdtext, idx);
  74.             if(!strlen(tmp))
  75.             {
  76.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: /ir [id]");
  77.                 return 1;
  78.             }
  79.             new Float:plocx,Float:plocy,Float:plocz;
  80.             new plo, world;
  81.             plo = ReturnUser(tmp);
  82.             world = GetPlayerVirtualWorld(plo);
  83.             if (IsPlayerConnected(plo))
  84.             {
  85.                 if(plo != INVALID_PLAYER_ID)
  86.                 {
  87.                     if (PlayerInfo[playerid][pAdmin] >= 1)
  88.                     {
  89.                         if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  90.                         {
  91.                             SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  92.                             return 1;
  93.                         }
  94.                         if(PlayerInfo[plo][pAdmin] >= 1342 && PlayerInfo[playerid][pAdmin] < 1342)
  95.                         {
  96.                             SendClientMessage(playerid, COLOR_GRAD1, "Você não pode ir até um Admin Dono !");
  97.                             return 1;
  98.                         }
  99.                         if(Spectate[playerid] != 255)
  100.                         {
  101.                             Spectate[playerid] = 256;
  102.                         }
  103.                         GetPlayerPos(plo, plocx, plocy, plocz);
  104.                         if(PlayerInfo[plo][pInt] > 0)
  105.                         {
  106.                             SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
  107.                             PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
  108.                             PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
  109.                         }
  110.                         if(PlayerInfo[plo][pInt] == 0)
  111.                         {
  112.                             SetPlayerInterior(playerid,0);
  113.                         }
  114.                         if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
  115.                         {
  116.                             SetPlayerInterior(playerid,1);
  117.                             PlayerInfo[playerid][pInt] = 1;
  118.                         }
  119.                         if (GetPlayerState(playerid) == 2)
  120.                         {
  121.                             new tmpcar = GetPlayerVehicleID(playerid);
  122.                             SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0);
  123.                             TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  124.                         }
  125.                         else
  126.                         {
  127.                             SetPlayerPos(playerid,plocx,plocy+2, plocz);
  128.                         }
  129.                         SetPlayerVirtualWorld(playerid, world);
  130.                         SendClientMessage(playerid, 0x33FF00FF, "Você foi teleportado pelo Admin !");
  131.                         GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  132.                         GetPlayerName(plo, plname, MAX_PLAYER_NAME);
  133.                         if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  134.                         {}
  135.                         else { format(string, sizeof(string), "O Admin %s Foi Até %s.",playername,plname); }
  136.                         ProxDetector(30.0, playerid, string, 0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF);
  137.                     }
  138.                     else
  139.                     {
  140.                         SendClientMessage(playerid, COLOR_GRAD1, "   Você não esta autorizado a usar este comando!");
  141.                     }
  142.                 }
  143.             }
  144.             else
  145.             {
  146.                 SendClientMessage(playerid, COLOR_GRAD1, "   Esse não é um player ativo.");
  147.             }
  148.         }
  149.         return 1;
  150.     }
  151.  
  152. --------------------------------------------------------------------
  153.  
  154.     if(strcmp(cmd, "/trazer", true) == 0)
  155.     {
  156.         if(IsPlayerConnected(playerid))
  157.         {
  158.             tmp = strtok(cmdtext, idx);
  159.             if(!strlen(tmp))
  160.             {
  161.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: /trazer [id]");
  162.                 return 1;
  163.             }
  164.             new Float:plocx,Float:plocy,Float:plocz;
  165.             new plo, world;
  166.             plo = ReturnUser(tmp);
  167.             world = GetPlayerVirtualWorld(playerid);
  168.             if(PlayerInfo[plo][pJailed] != 0)
  169.             {
  170.                 SendClientMessage(playerid, COLOR_GRAD1, "Você não pode trazer um Preso");
  171.                 return 1;
  172.             }
  173.             if (IsPlayerConnected(plo))
  174.             {
  175.                 if(plo != INVALID_PLAYER_ID)
  176.                 {
  177.                     if (PlayerInfo[playerid][pAdmin] >= 1)
  178.                     {
  179.                         if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  180.                         {
  181.                             SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  182.                             return 1;
  183.                         }
  184.                         if(PlayerInfo[plo][pAdmin] >= 1342 && PlayerInfo[playerid][pAdmin] < 1342)
  185.                         {
  186.                             SendClientMessage(playerid, COLOR_GRAD1, "Você não pode trazer um Admin Dono !");
  187.                             return 1;
  188.                         }
  189.                         GetPlayerPos(playerid, plocx, plocy, plocz);
  190.                         if(PlayerInfo[playerid][pInt] > 0)
  191.                         {
  192.                             SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
  193.                             PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
  194.                             PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
  195.                         }
  196.                         if(PlayerInfo[playerid][pInt] == 0)
  197.                         {
  198.                             SetPlayerInterior(plo,0);
  199.                         }
  200.                         if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
  201.                         {
  202.                             SetPlayerInterior(plo,1);
  203.                             PlayerInfo[plo][pInt] = 1;
  204.                         }
  205.                         if (GetPlayerState(plo) == 2)
  206.                         {
  207.                             TelePos[plo][0] = 0.0;
  208.                             TelePos[plo][1] = 0.0;
  209.                             new tmpcar = GetPlayerVehicleID(plo);
  210.                             SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0);
  211.                             SetVehicleVirtualWorld(tmpcar,world);
  212.                         }
  213.                         else
  214.                         {
  215.                             SetPlayerPos(plo,plocx,plocy+2, plocz);
  216.                         }
  217.                         SetPlayerVirtualWorld(plo,world);
  218.                         SendClientMessage(plo, 0x33FF00FF, "Você foi teleportado pelo Admin !");
  219.                     }
  220.                     else
  221.                     {
  222.                         SendClientMessage(playerid, COLOR_GRAD1, "   Você não está autorizado a usar este comando!");
  223.                     }
  224.                 }
  225.             }
  226.             else
  227.             {
  228.                 SendClientMessage(playerid, COLOR_GRAD1, "   Esse não é um jogador ativo.");
  229.             }
  230.         }
  231.         return 1;
  232.     }
  233.  
  234. -------------------------------------------------------------------
  235.     if(strcmp(cmd, "/kick", true) == 0)
  236.     {
  237.         if(IsPlayerConnected(playerid))
  238.         {
  239.             tmp = strtok(cmdtext, idx);
  240.             if(!strlen(tmp))
  241.             {
  242.                 SendClientMessage(playerid, COLOR_GRAD2, "USE: /kick [Id Do Jogador] [motivo]");
  243.                 return 1;
  244.             }
  245.             giveplayerid = ReturnUser(tmp);
  246.             if (PlayerInfo[playerid][pAdmin] >= 1)
  247.             {
  248.                 if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  249.                 {
  250.                     SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  251.                     return 1;
  252.                 }
  253.                 if(IsPlayerConnected(giveplayerid))
  254.                 {
  255.                     if(giveplayerid != INVALID_PLAYER_ID)
  256.                     {
  257.                         if(PlayerInfo[giveplayerid][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
  258.                         {
  259.                             SendClientMessage(playerid, COLOR_GRAD1, "Você não pode kickar um Admin Dono !");
  260.                             return 1;
  261.                         }
  262.                         GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  263.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  264.                         new length = strlen(cmdtext);
  265.                         while ((idx < length) && (cmdtext[idx] <= ' '))
  266.                         {
  267.                             idx++;
  268.                         }
  269.                         new offset = idx;
  270.                         new result[64];
  271.                         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  272.                         {
  273.                             result[idx - offset] = cmdtext[idx];
  274.                             idx++;
  275.                         }
  276.                         result[idx - offset] = EOS;
  277.                         if(!strlen(result))
  278.                         {
  279.                             SendClientMessage(playerid, COLOR_GRAD2, "USE: /kick [Id Do Jogador] [motivo]");
  280.                             return 1;
  281.                         }
  282.                         getdate(year, month, day);
  283.                         if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  284.                         {
  285.                             format(string, sizeof(string), "AdmCmd: %s foi kickado por BooT_VirtuaL(Modo Cia), Motivo: %s (%d-%d-%d)", giveplayer, (result),day,month,year);
  286.                             //KickLog(string);
  287.                             format(string, sizeof(string), "AdmCmd: %s foi kickado por BooT_VirtuaL, Motivo: %s", giveplayer, (result));
  288.                             SendClientMessageToAll(COLOR_LIGHTRED, string);
  289.                         }
  290.                         else
  291.                         {
  292.                             format(string, sizeof(string), "AdmCmd: %s foi kickado por %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),day,month,year);
  293.                             //KickLog(string);
  294.                             format(string, sizeof(string), "AdmCmd: %s foi kickado por %s, Motivo: %s", giveplayer, sendername, (result));
  295.                             SendClientMessageToAll(COLOR_LIGHTRED, string);
  296.                         }
  297.                         Kick(giveplayerid);
  298.                         return 1;
  299.                     }
  300.                 }
  301.             }
  302.             else
  303.             {
  304.                 SendClientMessage(playerid, COLOR_GRAD1, "   Esse não é um jogador ativo.");
  305.             }
  306.         }
  307.         return 1;
  308.     }
  309.  
  310.  
  311. -------------------------------------------
  312.  
  313.  
  314.  
Advertisement
Add Comment
Please, Sign In to add comment