StraliotiF

GameMode fsWAR 0.1

Oct 9th, 2016
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 34.93 KB | None | 0 0
  1. /*
  2. ====[Á FAZER]====
  3. ARRUMAR OS SPAWNS NOVOS PARA OS ALIADOS!
  4. TEXTDRAW
  5. ENTRADA NOVA PARA DIGITAR /ESCOLHER
  6.  
  7. ====[BUGS]======
  8. NENHUM ENCONTRADO!
  9.  
  10. Feito por: Fábio Stralioti
  11. www.fabiostralioti.esy.es
  12. */
  13.  
  14.  
  15. #include <a_samp>
  16. #include <zcmd>
  17. #include <sscanf2>
  18. #include <dof2>
  19.  
  20. #define COR_AZUL 0x2641FEAA
  21. #define COR_ERRO 0xFF0000FF
  22. #define COR_VERDE 0x33AA33AA
  23. #define COR_AMARELO 0xFFFF00AA
  24. #define COR_LARANJA 0xFF8000FF
  25. #define Kick(%0) SetTimerEx("Kicka", 100, false, "i", %0)
  26. #define Ban(%0) SetTimerEx("Bana", 100, false, "i", %0)
  27. #define banido "Banidos\\%s.ini"
  28. #define ESCOLHA 1
  29. #define ALIADOS 2
  30. #define EIXO 3
  31. #define LOJA 4
  32. #define LOJAARMAS 5
  33. #define LOJAVEICULOS 6
  34. #define LOJAMUNICAO 7
  35. #define DIALOG_LOGAR 8
  36. #define DIALOG_REGISTRO 9
  37. #define VALOR 500
  38. #define TEMPO 30
  39.  
  40. enum pInfo {
  41.     pStaff,
  42.     pNacao,
  43.     pSenha[35],
  44.     pSkin,
  45.     pDinheiro,
  46.     pScore
  47. };
  48. new Stralioti[MAX_PLAYERS][pInfo];
  49. new id;
  50. new Float:FX, Float:FY, Float:FZ;
  51. new Float:X, Float:Y, Float:Z, Float: Angle;
  52. new Erro[MAX_PLAYERS];
  53.  
  54. main() {
  55.     print("GameMode War Feito por: Fábio Stralioti");
  56. }
  57.  
  58. public OnGameModeInit() {
  59.     SetGameModeText("War[0.1]");
  60.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  61.     DisableInteriorEnterExits();
  62.     /* SPAWN ALIADOS */
  63.     AddStaticVehicleEx(433,2828.7000000,927.4000200,11.3000000,0.0000000,95,10,15); //Barracks
  64.     AddStaticVehicleEx(470,2811.2000000,929.0000000,10.9000000,0.0000000,95,10,15); //Patriot
  65.     AddStaticVehicleEx(470,2808.1001000,929.0000000,10.9000000,0.0000000,95,10,15); //Patriot
  66.     AddStaticVehicleEx(470,2804.6001000,929.0000000,10.9000000,0.0000000,95,10,15); //Patriot
  67.     AddStaticVehicleEx(500,2817.5000000,928.7000100,11.0000000,0.0000000,38,55,15); //Mesa
  68.     AddStaticVehicleEx(433,2823.7000000,927.5000000,11.3000000,0.0000000,95,10,15); //Barracks
  69.     AddStaticVehicleEx(433,2834.2000000,927.5000000,11.3000000,0.0000000,95,10,15); //Barracks
  70.     AddStaticVehicleEx(500,2814.2002000,928.7998000,11.0000000,0.0000000,38,55,15); //Mesa
  71.     AddStaticVehicleEx(500,2820.7000000,928.5999800,11.0000000,0.0000000,38,55,15); //Mesa
  72.     AddStaticVehicleEx(468,2827.5000000,939.7000100,10.5000000,0.0000000,22,34,15); //Sanchez
  73.     AddStaticVehicleEx(468,2833.5000000,940.5996100,10.5000000,0.0000000,22,34,15); //Sanchez
  74.     AddStaticVehicleEx(468,2830.7002000,940.2998000,10.5000000,0.0000000,22,34,15); //Sanchez
  75.     /* SPAWN EIXO */
  76.     AddStaticVehicleEx(470,-2127.8999000,-113.6000000,35.4000000,0.0000000,95,10,15); //Patriot
  77.     AddStaticVehicleEx(470,-2131.3000000,-113.7000000,35.4000000,0.0000000,95,10,15); //Patriot
  78.     AddStaticVehicleEx(470,-2124.5000000,-113.7000000,35.4000000,0.0000000,95,10,15); //Patriot
  79.     AddStaticVehicleEx(500,-2120.5000000,-114.5000000,35.5000000,0.0000000,115,46,15); //Mesa
  80.     AddStaticVehicleEx(500,-2114.8000000,-114.7000000,35.5000000,0.0000000,115,46,15); //Mesa
  81.     AddStaticVehicleEx(500,-2117.7002000,-114.5996100,35.5000000,0.0000000,115,46,15); //Mesa
  82.     AddStaticVehicleEx(433,-2116.7000000,-129.8999900,35.9000000,272.0000000,95,10,15); //Barracks
  83.     AddStaticVehicleEx(433,-2116.7000000,-125.1000000,35.9000000,272.0000000,95,10,15); //Barracks
  84.     AddStaticVehicleEx(433,-2116.5000000,-135.3000000,35.9000000,272.0000000,95,10,15); //Barracks
  85.     AddStaticVehicleEx(468,-2113.2000000,-141.6000100,35.1000000,274.0000000,132,4,15); //Sanchez
  86.     AddStaticVehicleEx(468,-2113.3999000,-140.7000000,35.1000000,273.9990000,132,4,15); //Sanchez
  87.     AddStaticVehicleEx(468,-2113.3000000,-142.3999900,35.1000000,273.9990000,132,4,15); //Sanchez
  88.     /* PICKUP ALIADOS */
  89.     CreatePickup(1239,1,2812.457031,893.352233,10.757797);
  90.     Create3DTextLabel("Para se equipar\nAperte F", COR_AZUL,2812.457031,893.352233,10.757797,25.0,0);
  91.     /* PICKUP EIXO */
  92.     CreatePickup(1239,1,-2135.262207,-137.921279,35.320312);
  93.     Create3DTextLabel("Para se equipar\nAperte F", COR_AMARELO,-2135.262207,-137.921279,35.320312,25.0,0);
  94.     /* PICKUP LOJAS*/
  95.     CreatePickup(1252,1,-1989.306762,1040.454956,55.726562);
  96.     Create3DTextLabel("Para abrir a loja\nAperte F", COR_AZUL,-1989.306762,1040.454956,55.726562,25.0,0);
  97.    
  98.     SetTimer("payday", TEMPO * 60000, true);
  99.     return 1;
  100. }
  101.  
  102. public OnGameModeExit() {
  103.     DOF2_Exit();
  104.     return 1;
  105. }
  106.  
  107. public OnPlayerConnect(playerid) {
  108.     SendClientMessage(playerid, COR_AZUL,"Bem Vindo ao servidor War, Divirta-se");
  109.     new admin[34];
  110.     format(admin, sizeof(admin), "Jogadores/%s.ini", nome(playerid));
  111.     new arquivo[40];
  112.     format(arquivo, 40, "Jogadores/%s.ini", nome(playerid));
  113.     if(DOF2_FileExists(arquivo)) {
  114.         ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "fsWAR - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
  115.     }
  116.     else {
  117.         ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "fsWAR - Registro", "Status da conta : Não Registrada\n digite uma senha para se registrar!", "Registrar", "Cancelar");
  118.     }
  119.     carregararmas(playerid);
  120.     Stralioti[playerid][pNacao] = 0;
  121.    
  122.  
  123.     SetPlayerMapIcon(playerid,0,-1989.540527,1040.333007,55.726562,6,0);
  124.     return 1;
  125. }
  126.  
  127. public OnPlayerDisconnect(playerid, reason) {
  128.     new admin[34];
  129.     format(admin, sizeof(admin), "Jogadores/%s.ini", nome(playerid));
  130.     if (!DOF2_FileExists(admin)) {
  131.         DOF2_CreateFile(admin);
  132.  
  133.         DOF2_SetInt(admin, "Level", Stralioti[playerid][pStaff]);
  134.         DOF2_SaveFile();
  135.     }
  136.     else {
  137.         DOF2_SetInt(admin, "Level", Stralioti[playerid][pStaff]);
  138.         DOF2_SaveFile();
  139.     }
  140.     new arquivo[40];
  141.     format(arquivo, 40, "Jogadores/%s.ini", nome(playerid));
  142.     if(DOF2_FileExists(arquivo)) {
  143.         DOF2_SetInt(arquivo, "Senha", Stralioti[playerid][pSenha]);
  144.         DOF2_SetInt(arquivo, "Skin", Stralioti[playerid][pSkin]);
  145.         Stralioti[playerid][pDinheiro] = GetPlayerMoney(playerid);
  146.         DOF2_SetInt(arquivo, "Dinheiro", Stralioti[playerid][pDinheiro]);
  147.         Stralioti[playerid][pScore] = GetPlayerScore(playerid);
  148.         DOF2_SetInt(arquivo, "Score", Stralioti[playerid][pScore]);
  149.         DOF2_SaveFile();
  150.     }
  151.     salvararmas(playerid);
  152.     Stralioti[playerid][pNacao] = 0;
  153.     return 1;
  154. }
  155.  
  156. public OnPlayerSpawn(playerid) {
  157.     SetPlayerSkin(playerid, Stralioti[playerid][pSkin]);
  158.  
  159.     if(Stralioti[playerid][pNacao] == 1) {
  160.         TogglePlayerControllable(playerid, 1);
  161.         SetPlayerPos(playerid,2375.8696,-1910.2778,13.3828);
  162.         SetPlayerColor(playerid, COR_AZUL);
  163.     }
  164.     /* Reino Unido  /\*/
  165.     if(Stralioti[playerid][pNacao] == 2) {
  166.         TogglePlayerControllable(playerid, 1);
  167.         SetPlayerPos(playerid,2070.6306,-1601.3375,13.5379);
  168.         SetPlayerColor(playerid, COR_AZUL);
  169.     }
  170.     /* França /\ */
  171.     if(Stralioti[playerid][pNacao] == 3) {
  172.         TogglePlayerControllable(playerid, 1);
  173.         SetPlayerPos(playerid,1648.1343,-1447.4480,13.5469);
  174.         SetPlayerColor(playerid, COR_AZUL);
  175.     }
  176.     /* União Sovietica /\  */
  177.     if(Stralioti[playerid][pNacao] == 4) {
  178.         TogglePlayerControllable(playerid, 1);
  179.         SetPlayerPos(playerid,1471.4244,-1148.5503,24.4108);
  180.         SetPlayerColor(playerid, COR_AZUL);
  181.     }
  182.     /* EUA  /\ */
  183.     if(Stralioti[playerid][pNacao] == 5) {
  184.         TogglePlayerControllable(playerid, 1);
  185.         SetPlayerPos(playerid,1339.2661,-918.9778,35.7952);
  186.         SetPlayerColor(playerid, COR_AZUL);
  187.     }
  188.     /* China  /\ */
  189.     if(Stralioti[playerid][pNacao] == 6) {
  190.         TogglePlayerControllable(playerid, 1);
  191.         SetPlayerPos(playerid,-1523.6552,879.1005,7.1875);
  192.         SetPlayerColor(playerid, COR_AZUL);
  193.     }
  194.     /* BR /\ */
  195.    /* EIXO \/ */
  196.     if(Stralioti[playerid][pNacao] == 7) {
  197.         TogglePlayerControllable(playerid, 1);
  198.         SetPlayerPos(playerid,1956.2843,1369.1185,9.2578);
  199.         SetPlayerColor(playerid, COR_AZUL);
  200.     }
  201.     /* Alemanha */
  202.     if(Stralioti[playerid][pNacao] == 8) {
  203.         TogglePlayerControllable(playerid, 1);
  204.         SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  205.         SetPlayerColor(playerid, COR_AMARELO);
  206.     }
  207.     /* Japão */
  208.     if(Stralioti[playerid][pNacao] == 9) {
  209.         TogglePlayerControllable(playerid, 1);
  210.         SetPlayerPos(playerid,2507.6912,2410.8088,10.6719);
  211.         SetPlayerColor(playerid, COR_AMARELO);
  212.     }
  213.     /* Itália */
  214.     if(Stralioti[playerid][pNacao] == 10) {
  215.         TogglePlayerControllable(playerid, 1);
  216.         SetPlayerPos(playerid,2358.9517,2575.5854,10.8203);
  217.         SetPlayerColor(playerid, COR_AMARELO);
  218.     }
  219.     /* Romênia */
  220.     if(Stralioti[playerid][pNacao] == 11) {
  221.         TogglePlayerControllable(playerid, 1);
  222.         SetPlayerPos(playerid,1789.8973,2468.5222,7.3221);
  223.         SetPlayerColor(playerid, COR_AMARELO);
  224.     }
  225.     /* Tailândia */
  226.     if(Stralioti[playerid][pNacao] == 12) {
  227.         TogglePlayerControllable(playerid, 1);
  228.         SetPlayerPos(playerid,1734.5414,1789.8710,10.8203);
  229.         SetPlayerColor(playerid, COR_AMARELO);
  230.     }
  231.     /* Hungria */
  232.     if(Stralioti[playerid][pNacao] == 13) {
  233.         TogglePlayerControllable(playerid, 1);
  234.         SetPlayerPos(playerid,-2023.5206, 156.3955, 28.8359);
  235.         SetPlayerColor(playerid, COR_AMARELO);
  236.     }
  237.     /* Bulgaria */
  238.     return 1;
  239. }
  240.  
  241. forward MensagemAdmins(const fstralioti[]);
  242. public MensagemAdmins(const fstralioti[]) {
  243.     for(new i; i <GetPlayerPoolSize() + 1; i++) {
  244.         if(IsPlayerConnected(i) == 1) {
  245.             if(Stralioti[i][pStaff] >= 1) {
  246.                 SendClientMessage(i, COR_VERDE, fstralioti);
  247.             }
  248.         }
  249.     }
  250.     return 1;
  251. }
  252.  
  253. public OnPlayerDeath(playerid, killerid, reason) {
  254.     new arma[32], stralioti[100];
  255.     GetWeaponName(reason, arma, sizeof(arma));
  256.     format(stralioti, sizeof(stralioti), "%s matou o %s com a arma: %s", nome(playerid), nome(killerid), arma);
  257.     SendClientMessageToAll(COR_LARANJA, stralioti);
  258.     return 1;
  259. }
  260.  
  261. payday();
  262. public payday() {
  263.     new hora, minuto, segundo, playerid;
  264.     gettime(hora, minuto, segundo);
  265.     if(!minuto) {
  266.         for(new i; i <GetPlayerPoolSize() + 1; i++) { if(IsPlayerConnected(i)) {
  267.             GivePlayerMoney(i, VALOR);
  268.             SetPlayerScore(i, GetPlayerScore(i) + 1);
  269.             new arquivo[40];
  270.             format(arquivo, 40, "Jogadores/%s.ini", nome(playerid));
  271.             if(DOF2_FileExists(arquivo)) {
  272.                 SendClientMessageToAll(COR_LARANJA, "Você recebeu o PAYDAY!");
  273.                 DOF2_SetInt(arquivo, "Dinheiro", Stralioti[playerid][pDinheiro]);
  274.                 Stralioti[playerid][pScore] = GetPlayerScore(playerid);
  275.                 DOF2_SetInt(arquivo, "Score", Stralioti[playerid][pScore]);
  276.                 DOF2_SaveFile();
  277.             }
  278.         }
  279.     }
  280. }
  281.     return 1;
  282. }
  283.  
  284. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  285.  
  286.     new arquivo[40];
  287.     format(arquivo, 40, "Jogadores/%s.ini", nome(playerid));
  288.     if(dialogid == DIALOG_REGISTRO) {
  289.         if(!strval(inputtext)) {
  290.             ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "fsWAR - Registro", "Status da conta : Não Registrada\n digite uma senha para se registrar!", "Registrar", "Cancelar");
  291.             SendClientMessage(playerid, COR_ERRO, "Erro, Digite apenas números para se registrar.");
  292.             return 1;
  293.         }
  294.         if(!response) {
  295.             Kick(playerid);
  296.             return 1;
  297.         }
  298.         else {
  299.             Stralioti[playerid][pSenha] = strval(inputtext);
  300.             DOF2_CreateFile(arquivo);
  301.             DOF2_SetInt(arquivo, "Senha", Stralioti[playerid][pSenha]);
  302.             DOF2_SetInt(arquivo, "Skin", 0);
  303.            
  304.             DOF2_SaveFile();
  305.             SendClientMessage(playerid, COR_ERRO, "Sua Conta foi Registrada, Agora digite sua senha novamente para logar!");
  306.             ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "fsWAR - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
  307.         }
  308.     }
  309.     if(dialogid == DIALOG_LOGAR) {
  310.         if(!strval(inputtext)){
  311.             SendClientMessage(playerid, COR_ERRO, "Erro, Digite apenas números para se logar.");
  312.             ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "fsWAR - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
  313.             return 1;
  314.         }
  315.         if(!response) {
  316.             Kick(playerid);
  317.             return 1;
  318.         }
  319.         else {
  320.             Stralioti[playerid][pSenha] = DOF2_GetInt(arquivo, "Senha");
  321.             if(strval(inputtext) == Stralioti[playerid][pSenha]) {
  322.                 new stralioti[100];
  323.                 Stralioti[playerid][pSkin] = DOF2_GetInt(arquivo, "Skin");
  324.                 SetPlayerSkin(playerid, Stralioti[playerid][pSkin]);
  325.                 Stralioti[playerid][pDinheiro] = DOF2_GetInt(stralioti, "Dinheiro");
  326.                 GivePlayerMoney(playerid, Stralioti[playerid][pDinheiro]);
  327.                 Stralioti[playerid][pScore] = DOF2_GetInt(stralioti, "Score");
  328.                 SetPlayerScore(playerid, Stralioti[playerid][pScore]);
  329.                 SpawnPlayer(playerid);
  330.             }
  331.             else {
  332.                 ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "fsWAR - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
  333.                 Erro[playerid]++;
  334.                 if(Erro[playerid] == 5) {
  335.                     SendClientMessage(playerid, COR_ERRO, "Sua conta está banida por errar 5 vezes a sua senha, contacte o Admin para retirar seu Ban!");
  336.                     Ban(playerid);
  337.                     return 1;
  338.                 }
  339.             }
  340.         }
  341.     }
  342.  
  343.     if(dialogid == ESCOLHA) {
  344.         if(response) {
  345.             if(listitem == 0) {
  346.                 ShowPlayerDialog(playerid, ALIADOS, DIALOG_STYLE_LIST, "Guerra", "Reino Unido\nFrança\nUnião Soviética\nEstados Unidos\nChina\nBrasil", "Escolher", "Sair");
  347.             }
  348.             if(listitem == 1)  {
  349.                 ShowPlayerDialog(playerid, EIXO, DIALOG_STYLE_LIST, "Guerra", "Alemanha\nJapão\nItália\nRomênia\nTailândia\nHungria\nBulgária", "Escolher", "Sair");
  350.             }
  351.         }
  352.     }
  353.     if(dialogid == ALIADOS)
  354.     {
  355.         if(response)
  356.         {
  357.             if(listitem == 0) {
  358.                 Stralioti[playerid][pNacao] = 1;
  359.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  360.                 SetPlayerColor(playerid, COR_AZUL);
  361.                 SendClientMessage(playerid, COR_AZUL,"Você escolheu o Reino Unido");
  362.             }
  363.             if(listitem == 1) {
  364.                 Stralioti[playerid][pNacao] = 2;
  365.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  366.                 SetPlayerColor(playerid, COR_AZUL);
  367.                 SendClientMessage(playerid, COR_AZUL,"Você escolheu a França");
  368.             }
  369.             if(listitem == 2) {
  370.                 Stralioti[playerid][pNacao] = 3;
  371.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  372.                 SetPlayerColor(playerid, COR_AZUL);
  373.                 SendClientMessage(playerid, COR_AZUL,"Você escolheu a União Sovietica");
  374.             }
  375.             if(listitem == 3) {
  376.                 Stralioti[playerid][pNacao] = 4;
  377.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  378.                 SetPlayerColor(playerid, COR_AZUL);
  379.                 SendClientMessage(playerid, COR_AZUL,"Você escolheu o Estados Unidos");
  380.             }
  381.             if(listitem == 4) {
  382.                 Stralioti[playerid][pNacao] = 5;
  383.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  384.                 SetPlayerColor(playerid, COR_AZUL);
  385.                 SendClientMessage(playerid, COR_AZUL,"Você escolheu a China");
  386.             }
  387.             if(listitem == 5) {
  388.                 Stralioti[playerid][pNacao] = 6;
  389.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  390.                 SetPlayerColor(playerid, COR_AZUL);
  391.                 SendClientMessage(playerid, COR_AZUL,"Você escolheu o Brasil");
  392.            }
  393.         }
  394.     }
  395.     if(dialogid == EIXO)
  396.     {
  397.         if(response)
  398.         {
  399.             if(listitem == 0) {
  400.                 Stralioti[playerid][pNacao] = 7;
  401.                 SetPlayerPos(playerid,2156.7830,2209.8657,10.8203);
  402.                 SetPlayerColor(playerid, COR_AMARELO);
  403.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu a Alemanha");
  404.             }
  405.             if(listitem == 1) {
  406.                 Stralioti[playerid][pNacao] = 8;
  407.                 SetPlayerPos(playerid,2507.6912,2410.8088,10.6719);
  408.                 SetPlayerColor(playerid, COR_AMARELO);
  409.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu o Japão");
  410.             }
  411.             if(listitem == 2) {
  412.                 Stralioti[playerid][pNacao] = 9;
  413.                 SetPlayerPos(playerid,2358.9517,2575.5854,10.8203);
  414.                 SetPlayerColor(playerid, COR_AMARELO);
  415.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu a Itália");
  416.             }
  417.             if(listitem == 3) {
  418.                 Stralioti[playerid][pNacao] = 10;
  419.                 SetPlayerPos(playerid,1789.8973,2468.5222,7.3221);
  420.                 SetPlayerColor(playerid, COR_AMARELO);
  421.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu a Romênia");
  422.             }
  423.             if(listitem == 4) {
  424.                 Stralioti[playerid][pNacao] = 11;
  425.                 SetPlayerPos(playerid,1734.5414,1789.8710,10.8203);
  426.                 SetPlayerColor(playerid, COR_AMARELO);
  427.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu a Tailândia");
  428.             }
  429.             if(listitem == 5) {
  430.                 Stralioti[playerid][pNacao] = 12;
  431.                 SetPlayerPos(playerid,-2023.5206, 156.3955, 28.8359);
  432.                 SetPlayerColor(playerid, COR_AMARELO);
  433.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu a Hungria");
  434.             }
  435.             if(listitem == 6) {
  436.                 Stralioti[playerid][pNacao] = 13;
  437.                 SetPlayerPos(playerid,-1523.6552,879.1005,7.1875);
  438.                 SetPlayerColor(playerid, COR_AMARELO);
  439.                 SendClientMessage(playerid, COR_AMARELO,"Você escolheu a Bulgária");
  440.             }
  441.         }
  442.     }
  443.    
  444.     if(dialogid == LOJA) {
  445.         if(response) {
  446.             if(listitem == 0) {
  447.                 ShowPlayerDialog(playerid, LOJAARMAS, DIALOG_STYLE_TABLIST_HEADERS, "ARMAS",
  448.                 "Armas\tValor\tMunição\n\
  449.                  Granada\tR$500\t10\n\
  450.                  AK-K7\tR$800\t100\n\
  451.                  RPG\tR$1000\t10\n\
  452.                  HS Rocket\tR$1500\t10\n\
  453.                  Minigun\tR$2500\t100\n\
  454.                  Satchel Charge\tR$300\t5",
  455.                  "Escolher", "Sair");
  456.             }
  457.             if(listitem == 1) {
  458.                 ShowPlayerDialog(playerid, LOJAVEICULOS, DIALOG_STYLE_TABLIST_HEADERS, "VEÍCULOS",
  459.                 "Veículo\tValor\n\
  460.                  Hydra\tR$5000\n\
  461.                  Cargobob\tR$6000\n\
  462.                  Hunter\tR$6500\n\
  463.                  Rhino\tR$7000",
  464.                  "Escolher", "Sair");
  465.             }
  466.             if(listitem == 2) {
  467.                 ShowPlayerDialog(playerid, LOJAMUNICAO, DIALOG_STYLE_TABLIST_HEADERS, "MUNIÇÃO",
  468.                 "Munição\tValor\tQuantidade\n\
  469.                  Granada\tR$100\t10\n\
  470.                  AK-K7\tR$200\t300\n\
  471.                  RPG\tR$450\t30\n\
  472.                  HS Rocket\tR$650\t30\n\
  473.                  Minigun\tR$1000\t300\n\
  474.                  Satchel Charge\tR$50\t10",
  475.                  "Escolher", "Sair");
  476.             }
  477.         }
  478.     }
  479.     if(dialogid == LOJAARMAS) {
  480.         if(response) {
  481.             if(listitem == 0) {
  482.                 if(GetPlayerMoney(playerid) >= 500) {
  483.                     GivePlayerWeapon(playerid, 16, 10);
  484.                     GivePlayerMoney(playerid, -500);
  485.                     return 1;
  486.                 }
  487.                 else {
  488.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  489.                 }
  490.             }
  491.             if(listitem == 1) {
  492.                 if(GetPlayerMoney(playerid) >= 800) {
  493.                     GivePlayerWeapon(playerid, 30, 100);
  494.                     GivePlayerMoney(playerid, -800);
  495.                     return 1;
  496.                 }
  497.                 else {
  498.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  499.                 }
  500.             }
  501.             if(listitem == 2) {
  502.                 if(GetPlayerMoney(playerid) >= 1000) {
  503.                     GivePlayerWeapon(playerid, 35, 10);
  504.                     GivePlayerMoney(playerid, -1000);
  505.                     return 1;
  506.                 }
  507.                 else {
  508.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  509.                 }
  510.             }
  511.             if(listitem == 3) {
  512.                 if(GetPlayerMoney(playerid) >= 1500) {
  513.                     GivePlayerWeapon(playerid, 36, 10);
  514.                     GivePlayerMoney(playerid, -1500);
  515.                     return 1;
  516.                 }
  517.                 else {
  518.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  519.                 }
  520.             }
  521.             if(listitem == 4) {
  522.                 if(GetPlayerMoney(playerid) >= 2500) {
  523.                     GivePlayerWeapon(playerid, 38, 100);
  524.                     GivePlayerMoney(playerid, -2500);
  525.                     return 1;
  526.                 }
  527.                 else {
  528.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  529.                 }
  530.             }
  531.             if(listitem == 5) {
  532.                 if(GetPlayerMoney(playerid) >= 300) {
  533.                     GivePlayerWeapon(playerid, 39, 10);
  534.                     GivePlayerWeapon(playerid, 40, 10);
  535.                     GivePlayerMoney(playerid, -300);
  536.                     return 1;
  537.                 }
  538.                 else {
  539.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  540.                 }
  541.             }
  542.         }
  543.     }
  544.    
  545.     if(dialogid == LOJAVEICULOS) {
  546.         if(response) {
  547.             if(listitem == 0) {
  548.                 if(GetPlayerMoney(playerid) >= 5000) {
  549.                     GetPlayerPos(playerid, X, Y, Z);
  550.                     GetPlayerFacingAngle(playerid, Angle);
  551.                     CreateVehicle(520, X+5, Y, Z+1, Angle, random(100), random(100), -1);
  552.                     SendClientMessage(playerid, -1,"Você comprou um Hydra por R$ 5000");
  553.                     GivePlayerMoney(playerid, -5000);
  554.                     return 1;
  555.                 }
  556.                 else {
  557.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  558.                 }
  559.             }
  560.             if(listitem == 1) {
  561.                 if(GetPlayerMoney(playerid) >= 6000) {
  562.                     GetPlayerPos(playerid, X, Y, Z);
  563.                     GetPlayerFacingAngle(playerid, Angle);
  564.                     CreateVehicle(548, X+5, Y, Z+1, Angle, random(100), random(100), -1);
  565.                     SendClientMessage(playerid, -1,"Você comprou um CargoBob por R$ 6000");
  566.                     GivePlayerMoney(playerid, -6000);
  567.                     return 1;
  568.                 }
  569.                 else {
  570.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  571.                 }
  572.             }
  573.             if(listitem == 2) {
  574.                 if(GetPlayerMoney(playerid) >= 6500) {
  575.                     GetPlayerPos(playerid, X, Y, Z);
  576.                     GetPlayerFacingAngle(playerid, Angle);
  577.                     CreateVehicle(425, X+5, Y, Z+1, Angle, random(100), random(100), -1);
  578.                     SendClientMessage(playerid, -1,"Você comprou um Hunter por R$ 6500");
  579.                     GivePlayerMoney(playerid, -6500);
  580.                     return 1;
  581.                 }
  582.                 else {
  583.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  584.                 }
  585.             }
  586.             if(listitem == 3) {
  587.                 if(GetPlayerMoney(playerid) >= 7000) {
  588.                     GetPlayerPos(playerid, X, Y, Z);
  589.                     GetPlayerFacingAngle(playerid, Angle);
  590.                     CreateVehicle(432, X+5, Y, Z+1, Angle, random(100), random(100), -1);
  591.                     SendClientMessage(playerid, -1,"Você comprou um Rhino por R$ 7000");
  592.                     GivePlayerMoney(playerid, -7000);
  593.                     return 1;
  594.                 }
  595.                 else {
  596.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  597.                 }
  598.             }
  599.         }
  600.     }
  601.    
  602.     if(dialogid == LOJAMUNICAO) {
  603.         if(response) {
  604.             if(listitem == 0) {
  605.                 if(GetPlayerMoney(playerid) >= 100) {
  606.                     SetPlayerAmmo(playerid, 16, 10);
  607.                     GivePlayerMoney(playerid, -100);
  608.                     SendClientMessage(playerid, COR_VERDE,"Você comprou 10 munições para Granada");
  609.                     return 1;
  610.                 }
  611.                 else {
  612.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  613.                 }
  614.             }
  615.             if(listitem == 1) {
  616.                 if(GetPlayerMoney(playerid) >= 200) {
  617.                     SetPlayerAmmo(playerid, 30, 300);
  618.                     GivePlayerMoney(playerid, -200);
  619.                     SendClientMessage(playerid, COR_VERDE,"Você comprou 300 munições para AK-K7");
  620.                     return 1;
  621.                 }
  622.                 else {
  623.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  624.                 }
  625.             }
  626.             if(listitem == 2) {
  627.                 if(GetPlayerMoney(playerid) >= 450) {
  628.                     SetPlayerAmmo(playerid, 35, 30);
  629.                     GivePlayerMoney(playerid, -450);
  630.                     SendClientMessage(playerid, COR_VERDE,"Você comprou 30 munições para RPG");
  631.                     return 1;
  632.                 }
  633.                 else {
  634.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  635.                 }
  636.             }
  637.             if(listitem == 3) {
  638.                 if(GetPlayerMoney(playerid) >= 650) {
  639.                     SetPlayerAmmo(playerid, 36, 30);
  640.                     GivePlayerMoney(playerid, -650);
  641.                     SendClientMessage(playerid, COR_VERDE,"Você comprou 30 munições para HS-ROCKET");
  642.                     return 1;
  643.                 }
  644.                 else {
  645.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  646.                 }
  647.             }
  648.             if(listitem == 4) {
  649.                 if(GetPlayerMoney(playerid) >= 1000) {
  650.                     SetPlayerAmmo(playerid, 38, 300);
  651.                     GivePlayerMoney(playerid, -1000);
  652.                     SendClientMessage(playerid, COR_VERDE,"Você comprou 300 munições para Minigun");
  653.                     return 1;
  654.                 }
  655.                 else {
  656.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  657.                 }
  658.             }
  659.             if(listitem == 5) {
  660.                 if(GetPlayerMoney(playerid) >= 50) {
  661.                     SetPlayerAmmo(playerid, 39, 10);
  662.                     SetPlayerAmmo(playerid, 40, 10);
  663.                     GivePlayerMoney(playerid, -50);
  664.                     SendClientMessage(playerid, COR_VERDE,"Você comprou 10 munições para Satchel Charge");
  665.                     return 1;
  666.                 }
  667.                 else {
  668.                    return SendClientMessage(playerid, COR_ERRO,"Você não tem dinheiro suficiente!");
  669.                 }
  670.             }
  671.         }
  672.     }
  673.  
  674.     return 1;
  675. }
  676.  
  677. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
  678.     if ((newkeys == KEY_SECONDARY_ATTACK)) {
  679.         cmd_equipar(playerid);
  680.         cmd_equipar1(playerid);
  681.         cmd_lojinha(playerid);
  682.     }
  683.     return 1;
  684. }
  685.  
  686.  
  687. CMD:setstaff(playerid, params[]) {
  688.     new stralioti[128];
  689.     new level;
  690.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COR_ERRO, "Você não está logado na RCON");
  691.     if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, COR_ERRO,"Use: /setstaff [id] [level]");
  692.     if(level < 0 || level > 5) return SendClientMessage(playerid, COR_ERRO,"Level inválido de 1 á 5");
  693.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO, "Este jogador não está online!");
  694.     format(stralioti, sizeof(stralioti),"O %s setou o %s de Administrador Level %d", nome(playerid), nome(id), level);
  695.     MensagemAdmins(stralioti);
  696.     format(stralioti, sizeof(stralioti),"O %s setou você de Administrador Level %d", nome(playerid), level);
  697.     SendClientMessage(id, COR_VERDE, stralioti);
  698.     Stralioti[id][pStaff] = level;
  699.     return 1;
  700. }
  701.  
  702. CMD:vidatodos(playerid) {
  703.     new stralioti[100];
  704.     if(Stralioti[playerid][pStaff] > 1) {
  705.     for(new i; i <GetPlayerPoolSize() + 1; i++) {
  706.         SetPlayerHealth(i, 100);
  707.     }
  708.     format(stralioti, sizeof(stralioti),"O Administrador %s deu vida para todos do servidor!", nome(playerid));
  709.     SendClientMessageToAll(COR_VERDE, stralioti); }
  710.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  711.     return 1;
  712. }
  713.  
  714. CMD:coletetodos(playerid) {
  715.     new stralioti[100];
  716.     if(Stralioti[playerid][pStaff] >= 1)  {
  717.     for(new i; i <GetPlayerPoolSize() + 1; i++) {
  718.         SetPlayerArmour(i, 100);
  719.     }
  720.     format(stralioti, sizeof(stralioti),"O Administrador %s deu colete para todos do servidor!", nome(playerid));
  721.     SendClientMessageToAll(COR_VERDE, stralioti); }
  722.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  723.     return 1;
  724. }
  725.  
  726. CMD:spawnaliados(playerid) {
  727.     SetPlayerPos(playerid, 2810.9599609375, 950.88635253906, 16.699615478516);
  728.     return 1;
  729. }
  730.  
  731. CMD:spawneixo(playerid) {
  732.     SetPlayerPos(playerid, -2066.2482910156, -208.53169250488, 36.62845993042);
  733.     return 1;
  734. }
  735.  
  736. CMD:vida(playerid, params[]) {
  737.     new qntd, stralioti[100];
  738.     if(Stralioti[playerid][pStaff] >= 1) {
  739.     if(sscanf(params, "ud", id, qntd)) return SendClientMessage(playerid, COR_ERRO,"Use: /vida [id] [quantidade]");
  740.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"Este jogador não se encontra online");
  741.     if(qntd < 0 || qntd > 100) return SendClientMessage(playerid, COR_ERRO,"Quantidade inválida, de 0 á 100");
  742.     format(stralioti, sizeof(stralioti),"O Administrador %s setou a vida do %s para: %d", nome(playerid), nome(id), qntd);
  743.     SendClientMessageToAll(COR_VERDE, stralioti);
  744.     SetPlayerHealth(id, qntd); }
  745.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  746.     return 1;
  747. }
  748.  
  749. CMD:colete(playerid, params[]) {
  750.     new qntd, stralioti[100];
  751.     if(Stralioti[playerid][pStaff] >= 1) {
  752.     if(sscanf(params, "ud", id, qntd)) return SendClientMessage(playerid, COR_ERRO,"Use: /colete [id] [quantidade]");
  753.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"Este jogador não se encontra online");
  754.     if(qntd < 0 || qntd > 100) return SendClientMessage(playerid, COR_ERRO,"Quantidade inválida, de 0 á 100");
  755.     format(stralioti, sizeof(stralioti),"O Administrador %s setou o colete do %s para: %d", nome(playerid), nome(id), qntd);
  756.     SendClientMessageToAll(COR_VERDE, stralioti);
  757.     SetPlayerArmour(id, qntd); }
  758.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  759.     return 1;
  760. }
  761.  
  762. CMD:tr(playerid, params[])
  763. return cmd_trazer(playerid, params);
  764.  
  765. CMD:trazer(playerid, params[]) {
  766.     new stralioti[100];
  767.     if(Stralioti[playerid][pStaff] >= 1)  {
  768.     if(sscanf(params, "u", id)) return SendClientMessage(playerid, COR_ERRO,"Use: /trazer [id]");
  769.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"Este jogador não se encontra online");
  770.     GetPlayerPos(playerid, FX, FY, FZ);
  771.     SetPlayerPos(id, FX, FY, FZ);
  772.     format(stralioti, sizeof(stralioti),"O Administrador %s puxou o %s até ele!", nome(playerid), nome(id));
  773.     SendClientMessageToAll(COR_VERDE, stralioti); }
  774.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  775.     return 1;
  776. }
  777.  
  778. CMD:ir(playerid, params[]) {
  779.     new stralioti[100];
  780.     if(Stralioti[playerid][pStaff] >= 1){
  781.     if(sscanf(params, "u", id)) return SendClientMessage(playerid, COR_ERRO,"Use: /trazer [id]");
  782.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"Este jogador não se encontra online");
  783.     GetPlayerPos(id, FX, FY, FZ);
  784.     SetPlayerPos(playerid, FX, FY, FZ);
  785.     format(stralioti, sizeof(stralioti),"O Administrador %s foi até o %s!", nome(playerid), nome(id));
  786.     SendClientMessageToAll(COR_VERDE, stralioti); }
  787.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  788.     return 1;
  789. }
  790.  
  791. CMD:kick(playerid, params[]) {
  792.     new motivo, stralioti[120];
  793.     if(Stralioti[playerid][pStaff] >= 1)  {
  794.     if(sscanf(params, "us", id, motivo)) return SendClientMessage(playerid, COR_ERRO,"Use: /kick [id] [motivo]");
  795.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"Este jogador não se encontra online");
  796.     format(stralioti, sizeof(stralioti),"O Administrador %s kikou o %s motivo: %s", nome(playerid), nome(id), motivo);
  797.     SendClientMessageToAll(COR_ERRO, stralioti);
  798.     Kick(id); }
  799.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  800.     return 1;
  801. }
  802.  
  803. CMD:ban(playerid, params[]) {
  804.     new motivo, stralioti[120];
  805.     if(Stralioti[playerid][pStaff] >= 1) {
  806.     if(sscanf(params, "us", id, motivo)) return SendClientMessage(playerid, COR_ERRO,"Use: /ban [id] [motivo]");
  807.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"Este jogador não se encontra online");
  808.     format(stralioti, sizeof(stralioti), "O Administrador %s baniu o %s motivo: %s", nome(playerid), nome(id), motivo);
  809.     format(stralioti,sizeof(stralioti),banido,nome(id));
  810.     SendClientMessageToAll(COR_ERRO, stralioti);
  811.     DOF2_CreateFile(stralioti);
  812.     Ban(id); }
  813.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  814.     return 1;
  815. }
  816.  
  817. CMD:escolher(playerid) {
  818.     ShowPlayerDialog(playerid, ESCOLHA, DIALOG_STYLE_LIST, "GUERRA", "Aliados\nEixo", "Escolher", "Sair");
  819.     return 1;
  820. }
  821.  
  822. CMD:comandosstaff(playerid) {
  823.     if(Stralioti[playerid][pStaff] > 1) {
  824.     SendClientMessage(playerid, COR_AZUL,"=========[COMANDOS STAFF]=========");
  825.     SendClientMessage(playerid, COR_ERRO,"[LEVEL 1]: /vidatodos, /coletetodos, /vida, /colete, /trazer, /ir, /kick, /ban"); }
  826.     else SendClientMessage(playerid, COR_ERRO,"Você não tem permissão!");
  827.     return 1;
  828. }
  829.  
  830. CMD:comandos(playerid) {
  831.     SendClientMessage(playerid, COR_AZUL,"=========[COMANDOS]=========");
  832.     SendClientMessage(playerid, COR_ERRO,"/escolher, /spawnaliados, /spawneixo, /loja");
  833.     return 1;
  834. }
  835.  
  836. CMD:equipar(playerid) {
  837.     if(IsPlayerInRangeOfPoint(playerid, 2.0, 2812.457031, 893.352233, 10.757797)) {
  838.         GivePlayerWeapon(playerid, 23, 300);
  839.         GivePlayerWeapon(playerid, 25, 300);
  840.         GivePlayerWeapon(playerid, 29, 300);
  841.         GivePlayerWeapon(playerid, 34, 300);
  842.         GivePlayerWeapon(playerid, 4, 1);
  843.     }
  844.     return 1;
  845. }
  846.  
  847. CMD:equipar1(playerid) {
  848.     if(IsPlayerInRangeOfPoint(playerid, 2.0, -2135.262207,-137.921279,35.320312)) {
  849.         GivePlayerWeapon(playerid, 23, 300);
  850.         GivePlayerWeapon(playerid, 25, 300);
  851.         GivePlayerWeapon(playerid, 29, 300);
  852.         GivePlayerWeapon(playerid, 34, 300);
  853.         GivePlayerWeapon(playerid, 4, 1);
  854.     }
  855.     return 1;
  856. }
  857.  
  858. CMD:teste(playerid) {
  859.     GivePlayerMoney(playerid, 100000000);
  860.     return 1;
  861. }
  862.  
  863. CMD:lojinha(playerid) {
  864.     if(IsPlayerInRangeOfPoint(playerid, 2.0, -1989.306762,1040.454956,55.726562)) {
  865.     ShowPlayerDialog(playerid, LOJA, DIALOG_STYLE_LIST, "LOJA", "Armas Pesadas\nVeículos Fortes\nMunição", "Escolher", "Sair");
  866.     }
  867.     return 1;
  868. }
  869.  
  870. CMD:loja(playerid) {
  871.     ShowPlayerDialog(playerid, LOJA, DIALOG_STYLE_LIST, "LOJA", "Armas Pesadas\nVeículos Fortes\nMunição", "Escolher", "Sair");
  872.     return 1;
  873. }
  874.  
  875. CMD:creditos(playerid) {
  876.     SendClientMessage(playerid, COR_VERDE,"GameMode feito por: Fábio Stralioti");
  877.     SendClientMessage(playerid, COR_VERDE,"www.fabiostralioti.esy.es");
  878.     return 1;
  879. }
  880.  
  881. nome(playerid) {
  882.     new nomee[MAX_PLAYER_NAME];
  883.     GetPlayerName(playerid, nomee, sizeof(nomee));
  884.     return nomee;
  885. }
  886.  
  887. stock salvararmas(playerid) {
  888.     new Armas[13][2], straliotii[100], stralioti2[64];
  889.     for(new i = 0; i < 13; i++){
  890.     GetPlayerWeaponData(playerid, i, Armas[i][0], Armas[i][1]);
  891.     }
  892.     format(straliotii, sizeof straliotii, "/Armas/%s.txt", nome(playerid));
  893.     for(new i = 0; i < 13; i++) {
  894.         format(stralioti2, sizeof stralioti2, "Arma %d", i);
  895.         DOF2_SetInt(straliotii, stralioti2, Armas[i][0]);
  896.         format(stralioti2, sizeof stralioti2, "Municao %d", i);
  897.         DOF2_SetInt(straliotii, stralioti2, Armas[i][1]);
  898.     }
  899.     return 1;
  900. }
  901.  
  902. stock carregararmas(playerid) {
  903.     new straliotii[100], fabio[100], martins[100];
  904.     GetPlayerName(playerid, straliotii, 24);
  905.     format(straliotii, sizeof straliotii, "/Armas/%s.txt", straliotii);
  906.     if(!fexist(straliotii)) return DOF2_CreateFile(straliotii);
  907.     for(new i = 0; i < 13; i++) {
  908.         format(fabio, sizeof fabio, "Arma %d", i);
  909.         format(martins, sizeof martins, "Municao %d", i);
  910.         GivePlayerWeapon(playerid, DOF2_GetInt(straliotii, fabio), DOF2_GetInt(straliotii, martins));
  911.     }
  912.     return 1;
  913. }
  914.  
  915. forward Kicka(p); public Kicka(p) {
  916.     #undef Kick
  917.     Kick(p);
  918.     #define Kick(%0) SetTimerEx("Kicka", 100, false, "i", %0)
  919.     return 1;
  920. }
  921.  
  922. forward Bana(p); public Bana(p) {
  923.     #undef Ban
  924.     Ban(p);
  925.     #define Ban(%0) SetTimerEx("Bana", 100, false, "i", %0)
  926.     return 1;
  927. }
Advertisement
Add Comment
Please, Sign In to add comment