Guest User

Untitled

a guest
Apr 9th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.28 KB | None | 0 0
  1. // OnPlayerText
  2. public OnPlayerText(playerid, text[])
  3. {
  4.    new rString[128];
  5.    if(strfind(text, "189.", true) != -1 || strfind(text, "201.", true) != -1 || strfind(text, "200.", true) != -1 || strfind(text, "69.", true) != -1 || strfind(text, "187.", true) != -1
  6.    || strfind(text, "64.", true) != -1 || strfind(text, "120.", true) != -1 || strfind(text, "165.", true) != -1 || strfind(text, "85.", true) != -1 || strfind(text, ":7771", true) != -1
  7.    || strfind(text, ":7770", true) != -1 || strfind(text, "7777", true) != -1 || strfind(text, ":7776", true) != -1 || strfind(text, ":7777", true) != -1 || strfind(text, ":7778", true) != -1
  8.    || strfind(text, ":7779", true) != -1 || strfind(text, "1.", true) != -1 || strfind(text, ".br", true) != -1 || strfind(text, ".net", true) != -1 || strfind(text, ".blogspot", true) != -1
  9.    || strfind(text, ".forum", true) != -1 || strfind(text, ".wiki", true) != -1 || strfind(text, "wiki.", true) != -1 || strfind(text, ".info", true) != -1 || strfind(text, "www.", true) != -1
  10.    || strfind(text, ".org", true) != -1 || strfind(text, ".tk", true) != -1 || strfind(text, "co.cc", true) != -1 || strfind(text, "http", true) != -1)
  11.    {
  12.       format(rString, sizeof(rString), "[Anti-Divulgação] %s foi kickado automaticamente por tentar divulgar.", rNome(playerid));
  13.       SendClientMessageToAll(Vermelho, rString);
  14.       Kick(playerid);
  15.       return 0;
  16.    }
  17.    Flood[playerid]++;
  18.    SetTimerEx("TempoFlood", 1500, false, "d", playerid);
  19.    if(Flood[playerid] == 5)
  20.    {
  21.       format(rString, sizeof(rString), "[Anti-Flood] %s foi kickado automaticamente por fazer flood.", rNome(playerid));
  22.       SendClientMessageToAll(Vermelho, rString);
  23.       Kick(playerid);
  24.       return 0;
  25.    }
  26.    if(Logado[playerid] == false)
  27.    {
  28.       SendClientMessage(playerid, Verde, "[ERRO] Você deve spawnar para falar.");
  29.       return 0;
  30.    }
  31.    if(Calado[playerid] == true)
  32.    {
  33.       SendClientMessage(playerid, Verde, "[ERRO] Você não pode falar. Pois foi calado por um admin!");
  34.       return 0;
  35.    }
  36.    if(text[0] == '@')
  37.    {
  38.       if(ConvidadoGrupoID[playerid] > 0)
  39.       {
  40.          format(rString, sizeof(rString), "[ChatGrupo] %s(%d): {FFFFFF}%s", rNome(playerid), playerid, text[1]);
  41.          ChatGrupo(playerid, Amarelo, rString);
  42.          return 0;
  43.       }else{
  44.          SendClientMessage(playerid, Vermelho, "[INFO] O character '@' é privado para o Chat de Grupos.");
  45.          return 0;
  46.       }
  47.    }
  48.    if(text[0] == '!')
  49.    {
  50.       if(SDSAdmin[playerid] >= 1 || IsPlayerAdmin(playerid))
  51.       {
  52.          format(rString, sizeof(rString), "[Administrador] {A9A9A9}%s:{FFFFFF}%s", rNome(playerid), text[1]);
  53.          SendClientMessageToAll(Vermelho, rString);
  54.          return 0;
  55.       }
  56.    }else{
  57.    SetPlayerChatBubble(playerid, text, 0x696969AA, 10.0, 2500);
  58.    format(rString, sizeof(rString), "{FFFFFF}(%d)%s", playerid, text[0]);
  59.    SendPlayerMessageToAll(playerid, rString);
  60.    return 0;
  61.    }
  62.    return 1;
  63. }
  64. // Flood
  65. forward TempoFlood(playerid);
  66. public TempoFlood(playerid)
  67. {
  68.     Flood[playerid] = 0;
  69.     return 1;
  70. }
  71. // Erro de comando
  72. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  73. {
  74.     new rStr[128];
  75.     if(!success)
  76.     {
  77.         format(rStr, sizeof(rStr), "[Atenção]{A9A9A9} O Comando: {6495ED}%s{A9A9A9} Não existe! Use: {6495ED}/Comandos{A9A9A9} - {6495ED}/Ajuda{A9A9A9}.", cmdtext);
  78.         SendClientMessage(playerid, Azul, rStr);
  79.     }
  80.     return true;
  81. }
  82. // OnPlayerDeath
  83. public OnPlayerDeath(playerid, killerid, reason)
  84. {
  85.     if(Logado[playerid] != false)
  86.     {
  87.         SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  88.         SendDeathMessage(killerid, playerid, reason);
  89.         Kills[playerid] ++;
  90.         DestroyVehicle(SDSCar[playerid]);
  91.         AreaDM[playerid] = false;
  92.         SetTimerEx("TempoKill", 1500, false, "d", playerid);
  93.         if(Kills[playerid] == 5)
  94.         {
  95.              SendClientMessage(playerid, Vermelho, "[INFO] Aprenda a se comportar. Volte so quando aprender!");
  96.              Ban(playerid);
  97.         }
  98.     }
  99.     return 1;
  100. }
  101.  
  102. forward TempoKill(playerid);
  103. public TempoKill(playerid)
  104. {
  105.     Kills[playerid] = 0;
  106.     return 1;
  107. }
  108. // Request Class
  109. public OnPlayerRequestClass(playerid, classid)
  110. {
  111.     SetPlayerPos(playerid,-2677.0771,1602.9396,3.2226);
  112.     SetPlayerCameraPos(playerid,-2676.3555,1596.6190,3.2226);
  113.     SetPlayerCameraLookAt(playerid,-2676.5554,1599.8995,3.2226);
  114.     SetPlayerFacingAngle(playerid,180);
  115.     SetPlayerTime(playerid,12,0);
  116.     SetPlayerWeather(playerid,5);
  117.     ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
  118.     return 1;
  119. }
  120. // Stock Salvar Player
  121. stock SDSalvar(playerid)
  122. {
  123.    new rString[68];
  124.    format(rString,sizeof rString, Registros, rNome(playerid));
  125.    DOF2_SetInt(rString, "Dinheiro", GetPlayerMoney(playerid));
  126.    DOF2_SetInt(rString, "Score", GetPlayerScore(playerid));
  127.    DOF2_SetInt(rString, "Avisos", Avisos[playerid]);
  128.    DOF2_SetInt(rString, "Administrador", SDSAdmin[playerid]);
  129.    DOF2_SetInt(rString, "Grupo ID", ConvidadoGrupoID[playerid]);
  130.    DOF2_SaveFile();
  131.    return 1;
  132. }
  133. // Stock Carregando Player
  134. stock SDSLoad(playerid)
  135. {
  136.    new rString[68];
  137.    format(rString,sizeof rString, Registros, rNome(playerid));
  138.    GivePlayerMoney(playerid, DOF2_GetInt(rString, "Dinheiro"));
  139.    SetPlayerScore(playerid, DOF2_GetInt(rString, "Score"));
  140.    SDSAdmin[playerid] = DOF2_GetInt(rString, "Administrador");
  141.    Avisos[playerid] = DOF2_GetInt(rString, "Avisos");
  142.    ConvidadoGrupoID[playerid] = DOF2_GetInt(rString, "Grupo ID");
  143.    return 1;
  144. }
  145. // Stock MaxIps
  146. stock GetNumberOfPlayersOnThisIP(test_ip[])
  147. {
  148.     new against_ip[32+1];
  149.     new x = 0;
  150.     new ip_count = 0;
  151.     for(x=0; x<MAX_PLAYERS; x++)
  152.     {
  153.         if(IsPlayerConnected(x))
  154.         {
  155.             GetPlayerIp(x,against_ip,32);
  156.             if(!strcmp(against_ip,test_ip)) ip_count++;
  157.         }
  158.     }
  159.     return ip_count;
  160. }
  161. // Anti-Roubo
  162. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  163. {
  164.     SendClientMessage(playerid, Vermelho, "[AVISO]{FFFFFF} Não tente roubar veículos, você morrerá automaticamente{FF0000}.");
  165.     if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid,0.0);
  166.     return 1;
  167. }
  168.  
  169. stock IsVehicleOccupied(vehicleid)
  170. {
  171.     for(new i = 0; i < MAX_PLAYERS; i++)
  172.     if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  173.     return 1;
  174.     return 0;
  175. }
  176.  
  177. public SpawnPlayerid(playerid)
  178. {
  179.     new rand = random(sizeof(RandomSpawn));
  180.     SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
  181.     SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
  182.     return 1;
  183. }
  184. // DialogResponse
  185. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  186. {
  187.     new arq[50],String[100];
  188.     format(arq, sizeof arq, Registros, rNome(playerid));
  189.     if (dialogid == rRegistro)
  190.     {
  191.         if (response == 1)
  192.         {
  193.             if(!strlen(inputtext)) return ShowPlayerDialog(playerid, rRegistro, DIALOG_STYLE_PASSWORD, "[BPC] - Login", "{B9BCCC}Você deve escrever uma senha.\n\n{B9BCCC}Re-Digite a senha:", "Registrar", "Sair");
  194.             DOF2_CreateFile(arq);
  195.             LimparChatPlayer(playerid);
  196.             printf("[Registro] %s registrou-se. Sua Senha: %s", rNome(playerid), inputtext[0]);
  197.             format(String, sizeof(String), "{B9BCCC}Nome: {6495ED}%s{B9BCCC} registrado!\n\n{B9BCCC}Agora logue-se:", rNome(playerid));
  198.             ShowPlayerDialog(playerid, rLogin, DIALOG_STYLE_PASSWORD, "[BPC] - Login", String, "Logar", "Sair");
  199.             GivePlayerMoney(playerid, 5000);
  200.             SetPlayerScore(playerid, 0);
  201.             DOF2_SetString(arq, "Senha", inputtext);
  202.             SDSalvar(playerid);
  203.             return 1;
  204.         }
  205.         SendClientMessage(playerid, Vermelho, "> Você clicou na opção sair,e foi kickado! <");
  206.         Kick(playerid);
  207.     }
  208.     else if (dialogid == rLogin)
  209.     {
  210.         if (response == 1)
  211.         {
  212.             if(!strlen(inputtext)) return ShowPlayerDialog(playerid, rLogin, DIALOG_STYLE_PASSWORD, "[BPC] - Login", "{B9BCCC}Você deve escrever uma senha.\n\n{B9BCCC}Re-Digite a senha:", "Logar", "Sair");
  213.             if (!strcmp(DOF2_GetString(arq, "Senha"), inputtext))
  214.             {
  215.                 LimparChatPlayer(playerid);
  216.                 Logado[playerid] = true;
  217.                 TextDrawShowForPlayer(playerid, Novida);
  218.                 PrimeiroS[playerid] = true;
  219.                 SendClientMessage(playerid, Azul, "*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~");
  220.                 SendClientMessage(playerid, Branco, "» Brasil PlayCity ® DRIFT SHOW 2013  ©");
  221.                 SendClientMessage(playerid, Branco, "» Para mais informações,utilize: /Ajuda");
  222.                 SendClientMessage(playerid, Branco, "» Conheça nossos /mundos");
  223.                 SendClientMessage(playerid, Branco, "» Site: www.brasilplaycity.com.br");
  224.                 SendClientMessage(playerid, Azul, "*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~");
  225.                 SDSLoad(playerid);
  226.                 if(SDSAdmin[playerid] > 0)
  227.                 {
  228.                    SendClientMessage(playerid, Cinza, "Administrador: {FF0000}Sim");
  229.                 }else{
  230.                    SendClientMessage(playerid, Cinza, "Administrador: {FF0000}Não");
  231.                 }
  232.                 if(ConvidadoGrupoID[playerid] > 0)
  233.                 {
  234.                    SendClientMessage(playerid, Cinza, "Tem Grupo: {FF0000}Sim");
  235.                    TemGrupo[playerid] = true;
  236.                 }else{
  237.                    SendClientMessage(playerid, Cinza, "Tem Grupo: {FF0000}Não");
  238.                 }
  239.                 PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  240.                 return 1;
  241.             }
  242.             ShowPlayerDialog(playerid, rLogin, DIALOG_STYLE_PASSWORD, "[BPC] - Login", "{B9BCCC}Senha incorreta...\n\n{B9BCCC}Tente novamente:", "Logar", "Sair");
  243.             return 1;
  244.         }
  245.         SendClientMessage(playerid, Vermelho, "> Você clicou na opção sair,e foi kickado! <");
  246.         Kick(playerid);
  247.     }
  248.     if (dialogid == rMundos)
  249.     {
  250.         if(response)
  251.         {
  252.                 if(listitem == 0)
  253.                 {
  254.                     SendClientMessage(playerid, Cinza, "[INFO] Mundo:{FFFF00} Com Objetos{A9A9A9}, selecionado!");
  255.                     SetPlayerVirtualWorld(playerid, 0);
  256.                     ResetPlayerWeapons(playerid);
  257.                     DestroyVehicle(SDSCar[playerid]);
  258.                     MundoDM[playerid] = false;
  259.                 }
  260.                 if(listitem == 1)
  261.                 {
  262.                     SendClientMessage(playerid, Cinza, "[INFO] Mundo:{FFFF00} Sem Objetos{A9A9A9}, selecionado!");
  263.                     SetPlayerVirtualWorld(playerid, 1);
  264.                     ResetPlayerWeapons(playerid);
  265.                     DestroyVehicle(SDSCar[playerid]);
  266.                     MundoDM[playerid] = false;
  267.                 }
  268.                 if(listitem == 2)
  269.                 {
  270.                     SendClientMessage(playerid, Cinza, "[INFO] Mundo:{FFA500} Outro{A9A9A9}, selecionado!");
  271.                     SetPlayerVirtualWorld(playerid, 2);
  272.                     ResetPlayerWeapons(playerid);
  273.                     DestroyVehicle(SDSCar[playerid]);
  274.                     MundoDM[playerid] = false;
  275.                 }
  276.                 if(listitem == 3)
  277.                 {
  278.                     SendClientMessage(playerid, Cinza, "[INFO] Mundo:{FFA500} Outro 2{A9A9A9}, selecionado!");
  279.                     SetPlayerVirtualWorld(playerid, 3);
  280.                     ResetPlayerWeapons(playerid);
  281.                     DestroyVehicle(SDSCar[playerid]);
  282.                     MundoDM[playerid] = false;
  283.                 }
  284.                 if(listitem == 4)
  285.                 {
  286.                     SendClientMessage(playerid, Cinza, "[INFO] Mundo:{27FF10} Eventos{A9A9A9}, selecionado!");
  287.                     SetPlayerVirtualWorld(playerid, 4);
  288.                     ResetPlayerWeapons(playerid);
  289.                     DestroyVehicle(SDSCar[playerid]);
  290.                     MundoDM[playerid] = false;
  291.                 }
  292.                 if(listitem == 5)
  293.                 {
  294.                     SendClientMessage(playerid, Cinza, "[INFO] Mundo:{556B2F} Mata-Mata{A9A9A9}, selecionado!");
  295.                     SetPlayerVirtualWorld(playerid, 5);
  296.                     ResetPlayerWeapons(playerid);
  297.                     DestroyVehicle(SDSCar[playerid]);
  298.                     MundoDM[playerid] = true;
  299.                 }
  300.         }
  301.     }
  302.     new Str[120];
  303.     new Arquivos[50];
  304.     format(Str, sizeof(Str), "%s%s", playerid, rNome(playerid));
  305.     if (dialogid == Dica)
  306.     {
  307.         if (response == 1)
  308.         {
  309.              new Nome[100];
  310.              format(Nome, sizeof(Nome), "(Dica): %s", inputtext);
  311.              format(Arquivos, sizeof(Arquivos), rDB, rNome(playerid));
  312.              DOF2_SetString(Arquivos, Str, Nome);
  313.              DOF2_SaveFile();
  314.              SendClientMessage(playerid, Verde, "[INFO] Sua dica, foi enviada com sucesso.");
  315.              for (new r = 0; r != MAX_PLAYERS; r++)
  316.              {
  317.                  if(SDSAdmin[r] > 0 || IsPlayerAdmin(r))
  318.                  {
  319.                      if(IsPlayerConnected(r))
  320.                      {
  321.                          format(String, sizeof(String), "[INFO] Nova dica! Nome: {00FF00}%s{A9A9A9} Dica: {00FF00}%s", rNome(playerid), inputtext[0]);
  322.                          SendClientMessage(r, Cinza, String);
  323.                      }
  324.                  }
  325.              }
  326.         }
  327.     }
  328.     if (dialogid == Bug)
  329.     {
  330.         if (response == 1)
  331.         {
  332.              new Nome[100];
  333.              format(Nome, sizeof(Nome), "(Bug): %s", inputtext);
  334.              format(Arquivos, sizeof(Arquivos), rDB, rNome(playerid));
  335.              DOF2_SetString(Arquivos, Str, Nome);
  336.              DOF2_SaveFile();
  337.              SendClientMessage(playerid, Verde, "[INFO] Seu bug, foi enviado com sucesso.");
  338.              for (new r = 0; r != MAX_PLAYERS; r++)
  339.              {
  340.                  if(SDSAdmin[r] > 0 || IsPlayerAdmin(r))
  341.                  {
  342.                      if(IsPlayerConnected(r))
  343.                      {
  344.                          format(String, sizeof(String), "[INFO] Novo bug! Nome: {FF0000}%s{A9A9A9} Bug: {FF0000}%s", rNome(playerid), inputtext[0]);
  345.                          SendClientMessage(r, Cinza, String);
  346.                      }
  347.                  }
  348.              }
  349.         }
  350.     }
  351.     if(dialogid == rRadios)
  352.     {
  353.         if (response)
  354.         {
  355.             if (listitem == 0)
  356.             {
  357.                PlayAudioStreamForPlayer(playerid, "http://176.31.64.241:9960/");
  358.                SendClientMessage(playerid, -1, ">> Radio Power Mix.");
  359.             }
  360.             if (listitem == 1)
  361.             {
  362.                PlayAudioStreamForPlayer(playerid, "http://83.170.116.212:7589");
  363.                SendClientMessage(playerid, -1, ">> Radio Super Mix.");
  364.             }
  365.             if (listitem == 2)
  366.             {
  367.                PlayAudioStreamForPlayer(playerid,"http://live.hunterfm.com:8080/");
  368.                SendClientMessage(playerid, -1, ">> Radio Hunter.");
  369.             }
  370.             if (listitem == 3)
  371.             {
  372.                StopAudioStreamForPlayer(playerid);
  373.                SendClientMessage(playerid, Vermelho, ">> Radio Desligada.");
  374.             }
  375.         }
  376.     }
  377.     if (dialogid == rControles)
  378.     {
  379.         if (listitem == 0)
  380.         {
  381.             if (Lights[playerid] == 0)
  382.             {
  383.                 new veh = GetPlayerVehicleID(playerid);
  384.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  385.                 GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  386.                 SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
  387.                 Lights[playerid] = 1;
  388.             }
  389.             else if (Lights[playerid] == 1)
  390.             {
  391.                 new veh = GetPlayerVehicleID(playerid);
  392.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  393.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  394.                 SetVehicleParamsEx(veh, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
  395.                 Lights[playerid] = 0;
  396.             }
  397.         }
  398.         if (listitem == 1)
  399.         {
  400.             if (Bonnet[playerid] == 0)
  401.             {
  402.                 new veh = GetPlayerVehicleID(playerid);
  403.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  404.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  405.                 SetVehicleParamsEx(veh, engine, lights, alarm, doors, VEHICLE_PARAMS_ON, boot, objective);
  406.                 Bonnet[playerid] = 1;
  407.             }
  408.             else if (Bonnet[playerid] == 1)
  409.             {
  410.                 new veh = GetPlayerVehicleID(playerid);
  411.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  412.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  413.                 SetVehicleParamsEx(veh, engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, boot, objective);
  414.                 Bonnet[playerid] = 0;
  415.             }
  416.         }
  417.         if (listitem == 2)
  418.         {
  419.             if (Boot[playerid] == 0)
  420.             {
  421.                 new veh = GetPlayerVehicleID(playerid);
  422.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  423.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  424.                 SetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
  425.                 Boot[playerid] = 1;
  426.             }
  427.             else if (Boot[playerid] == 1)
  428.             {
  429.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  430.                 new veh = GetPlayerVehicleID(playerid);
  431.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  432.                 SetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
  433.                 Boot[playerid] = 0;
  434.             }
  435.         }
  436.         if (listitem == 3)
  437.         {
  438.             if (Engine[playerid] == 0)
  439.             {
  440.                 new veh = GetPlayerVehicleID(playerid);
  441.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  442.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  443.                 SetVehicleParamsEx(veh, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
  444.                 Engine[playerid] = 1;
  445.             }
  446.             else if (Engine[playerid] == 1)
  447.             {
  448.                 new veh = GetPlayerVehicleID(playerid);
  449.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  450.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  451.                 SetVehicleParamsEx(veh, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
  452.                 Engine[playerid] = 0;
  453.             }
  454.         }
  455.         if (listitem == 4)
  456.         {
  457.             if (Alarm[playerid] == 0)
  458.             {
  459.                 new veh = GetPlayerVehicleID(playerid);
  460.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  461.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  462.                 SetVehicleParamsEx(veh, engine, lights, VEHICLE_PARAMS_ON, doors, bonnet, boot, objective);
  463.                 Alarm[playerid] = 1;
  464.             }
  465.             else if (Engine[playerid] == 1)
  466.             {
  467.                 new veh = GetPlayerVehicleID(playerid);
  468.                 new engine, lights, alarm, doors, bonnet, boot, objective;
  469.                 GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
  470.                 SetVehicleParamsEx(veh, engine, lights, VEHICLE_PARAMS_OFF, doors, bonnet, boot, objective);
  471.                 Alarm[playerid] = 0;
  472.             }
  473.         }
  474.     }
  475.     if(dialogid == rCores)
  476.     {
  477.         if (response)
  478.         {
  479.             if (listitem == 0)
  480.             {
  481.                 SetPlayerColor(playerid, -1);
  482.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  483.             }
  484.             if (listitem == 1)
  485.             {
  486.                 SetPlayerColor(playerid, 0x000000AA);
  487.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  488.             }
  489.             if (listitem == 2)
  490.             {
  491.                 SetPlayerColor(playerid, 0xFF0000AA);
  492.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  493.             }
  494.             if (listitem == 3)
  495.             {
  496.                 SetPlayerColor(playerid, 0xFFFF00AA);
  497.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  498.             }
  499.             if (listitem == 4)
  500.             {
  501.                 SetPlayerColor(playerid, 0xFFA500AA);
  502.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  503.             }
  504.             if (listitem == 5)
  505.             {
  506.                 SetPlayerColor(playerid, 0xBEBEBEAA);
  507.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  508.             }
  509.             if (listitem == 6)
  510.             {
  511.                 SetPlayerColor(playerid, 0x912CEEAA);
  512.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  513.             }
  514.             if (listitem == 7)
  515.             {
  516.                 SetPlayerColor(playerid, 0xFF00FFAA);
  517.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  518.             }
  519.             if (listitem == 8)
  520.             {
  521.                 SetPlayerColor(playerid, 0x228B22AA);
  522.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  523.             }
  524.             if (listitem == 9)
  525.             {
  526.                 SetPlayerColor(playerid, 0x0000FFAA);
  527.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  528.             }
  529.             if (listitem == 10)
  530.             {
  531.                 SetPlayerColor(playerid, 0x00FF00AA);
  532.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  533.             }
  534.             if (listitem == 11)
  535.             {
  536.                 SetPlayerColor(playerid, 0x1E90FFAA);
  537.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  538.             }
  539.             if (listitem == 12)
  540.             {
  541.                 SetPlayerColor(playerid, 0xFFFFFF00);
  542.                 SendClientMessage(playerid, Branco, "[INFO] Cor Alterada.");
  543.             }
  544.         }
  545.     }
  546.     // Comandos
  547.     if(dialogid == rComandos)
  548.     {
  549.         if (response == 1)
  550.         {
  551.             new zString[500];
  552.             format(zString, sizeof(zString), "{FF0000}Lista de Comandos:\n\n");
  553.             strcat(zString, "{B9BCCC}/MeuTempo              - {6495ED}Muda a hora do seu jogo.\n");
  554.             strcat(zString, "{B9BCCC}/MeuClima               - {6495ED}Muda o clima do seu jogo.\n");
  555.             strcat(zString, "{B9BCCC}/MinhaSkin              - {6495ED}Muda sua skin.\n");
  556.             strcat(zString, "{B9BCCC}/SP                           - {6495ED}Salva sua posição.\n");
  557.             strcat(zString, "{B9BCCC}/IRP                          - {6495ED}Ir na sua posição salvada.\n");
  558.             strcat(zString, "{B9BCCC}/Ac                           - {6495ED}Acessorios para o player.\n\n");
  559.             strcat(zString, "{FF0000}> [AVISO] Idéias? Conte-nos: /Dica. <");
  560.             ShowPlayerDialog(playerid, rComandos2, DIALOG_STYLE_MSGBOX, "[SDS] - Comandos [2]", zString, "Fechar", "");
  561.         }
  562.     }
  563.     if (dialogid == rConvidar)
  564.     {
  565.         new rString[140];
  566.         if (response == 1)
  567.         {
  568.            format(rString, sizeof(rString), "[AVISO] %s e o mais novo membro do grupo.", rNome(playerid));
  569.            ChatGrupo(Player, Vermelho, rString);
  570.            ConvidadoGrupoID[playerid] = ConvidadoGrupoID[Player];
  571.            SendClientMessage(playerid, VerdeC, "[INFO] Convite aceito. Use /AjudaG para mais informações.");
  572.            TemGrupo[playerid] = true;
  573.            SDSalvar(playerid);
  574.         }
  575.         if (!response)
  576.         {
  577.            format(rString, sizeof(rString), "[AVISO] %s recusou o convite do grupo.", rNome(playerid));
  578.            ChatGrupo(Player, Vermelho, rString);
  579.            SendClientMessage(playerid, VerdeC, "[INFO] Convite recusado.");
  580.         }
  581.     }
  582.     if (dialogid == CoresG)
  583.     {
  584.         if (response)
  585.         {
  586.             if (listitem == 0)
  587.             {
  588.                 for (new r = 0; r != MAX_PLAYERS; r++)
  589.                 {
  590.                     if (IsPlayerConnected(r))
  591.                     {
  592.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  593.                         {
  594.                             SetPlayerColor(r, -1);
  595.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {FFFFFF}Branco");
  596.                         }
  597.                     }
  598.                 }
  599.             }
  600.             if (listitem == 1)
  601.             {
  602.                 for (new r = 0; r != MAX_PLAYERS; r++)
  603.                 {
  604.                     if (IsPlayerConnected(r))
  605.                     {
  606.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  607.                         {
  608.                             SetPlayerColor(r, 0xFF0000AA);
  609.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {FF0000}Vermelho");
  610.                         }
  611.                     }
  612.                 }
  613.             }
  614.             if (listitem == 2)
  615.             {
  616.                 for (new r = 0; r != MAX_PLAYERS; r++)
  617.                 {
  618.                     if (IsPlayerConnected(r))
  619.                     {
  620.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  621.                         {
  622.                             SetPlayerColor(r, 0x000000AA);
  623.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {000000}Preto");
  624.                         }
  625.                     }
  626.                 }
  627.             }
  628.             if (listitem == 3)
  629.             {
  630.                 for (new r = 0; r != MAX_PLAYERS; r++)
  631.                 {
  632.                     if (IsPlayerConnected(r))
  633.                     {
  634.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  635.                         {
  636.                             SetPlayerColor(r, 0x696969AA);
  637.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {696969}Cinza");
  638.                         }
  639.                     }
  640.                 }
  641.             }
  642.             if (listitem == 4)
  643.             {
  644.                 for (new r = 0; r != MAX_PLAYERS; r++)
  645.                 {
  646.                     if (IsPlayerConnected(r))
  647.                     {
  648.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  649.                         {
  650.                             SetPlayerColor(r, 0x00FF00AA);
  651.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {00FF00}Verde Claro");
  652.                         }
  653.                     }
  654.                 }
  655.             }
  656.             if (listitem == 5)
  657.             {
  658.                 for (new r = 0; r != MAX_PLAYERS; r++)
  659.                 {
  660.                     if (IsPlayerConnected(r))
  661.                     {
  662.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  663.                         {
  664.                             SetPlayerColor(r, 0x00FFFFAA);
  665.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {00FFFF}Azul Claro");
  666.                         }
  667.                     }
  668.                 }
  669.             }
  670.             if (listitem == 6)
  671.             {
  672.                 for (new r = 0; r != MAX_PLAYERS; r++)
  673.                 {
  674.                     if (IsPlayerConnected(r))
  675.                     {
  676.                         if(ConvidadoGrupoID[r] == ConvidadoGrupoID[playerid])
  677.                         {
  678.                             SetPlayerColor(r, 0x0000FFAA);
  679.                             SendClientMessage(r, -1, "[AVISO] O líder definiu a cor do grupo para: {0000FF}Azul");
Add Comment
Please, Sign In to add comment