Advertisement
Guest User

WSS 2.0

a guest
Oct 27th, 2014
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 20.59 KB | None | 0 0
  1. #include <a_samp>
  2. #include <DOF2>
  3.  
  4. #define PSDPLUGIN //Caso não queira utilizar a plugin PSD comente essa linha.
  5. /*
  6. Weapon Skill System por Mandrack_FreeZe.
  7. 5 Leveis de armas
  8. Incluindo todas as armas que da para setar a skill
  9. Incluido sistema de salvamento de skill dos players em Fini
  10. Não retire os Créditos!
  11. */
  12. #if defined PSDPLUGIN
  13. native CriarPasta(pasta[]);
  14. #endif
  15. new String[60];
  16. new DESkill[MAX_PLAYERS], PSkill[MAX_PLAYERS], SHSkill[MAX_PLAYERS], PSSkill[MAX_PLAYERS],SSSkill[MAX_PLAYERS],SPASSkill[MAX_PLAYERS],MUSkill[MAX_PLAYERS], MPSkill[MAX_PLAYERS],AKSkill[MAX_PLAYERS], M4Skill[MAX_PLAYERS], SRSkill[MAX_PLAYERS], FSAtivado;
  17. forward WSSLoad(playerid);
  18. forward WSSSave(playerid);
  19. public OnFilterScriptInit()
  20. {
  21. #if defined PSDPLUGIN
  22.     if(DOF2_FileExists("Player Skill"))
  23.     {
  24.         print("\n\n---------------------------------------------------");
  25.         print(" Weapon Skill System por Mandrack_FreeZe 2.0");
  26.         print(" PSD plugin criado por Victor')");
  27.         print("-----------------------------------------------------");
  28.         print(" Weapon Skill System carregado com sucesso!\n\n");
  29.     }
  30.     else {
  31.         CriarPasta("scriptfiles\\Player Skill");
  32.         print("Weapon Skill System criou a pasta 'Player Skill' automaticamente.");
  33.         print("\n\n---------------------------------------------------");
  34.         print(" Weapon Skill System por Mandrack_FreeZe 2.0");
  35.         print(" PSD plugin criado por Victor'");
  36.         print("-----------------------------------------------------");
  37.         print(" Weapon Skill System carregado com sucesso!\n\n");
  38.     }
  39. #else
  40.     print("\n\n---------------------------------------------------");
  41.     print(" Weapon Skill System por Mandrack_FreeZe 2.0");
  42.     print(" PSD plugin criado por Victor')");
  43.     print("-----------------------------------------------------");
  44.     print(" Weapon Skill System carregado com sucesso!\n\n");
  45. #endif
  46.     return 1;
  47. }
  48.  
  49. public OnFilterScriptExit()
  50. {
  51.     print("\n---------------------------------------------------");
  52.     print(" Weapon Skill System por Mandrack_FreeZe 2.0");
  53.     print("-----------------------------------------------------\n");
  54.     print(" Weapon Skill System desligado com sucesso!");
  55.     return 1;
  56. }
  57.  
  58. public OnPlayerSpawn(playerid)
  59. {
  60.     WSSLoad(playerid);
  61.     return 1;
  62. }
  63.  
  64. public OnPlayerDisconnect(playerid, reason)
  65. {
  66.     WSSSave(playerid);
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerDeath(playerid, killerid, reason)
  71. {
  72.     if(FSAtivado == 0)
  73.     {
  74.         if(GetPlayerWeapon(killerid) == 24)
  75.         {
  76.             DESkill[killerid]++;
  77.         }
  78.        
  79.         else if(GetPlayerWeapon(killerid) == 22)
  80.         {
  81.             PSkill[killerid]++;
  82.         }
  83.        
  84.         else if(GetPlayerWeapon(killerid) == 23)
  85.         {
  86.             PSSkill[killerid]++;
  87.         }
  88.  
  89.         else if(GetPlayerWeapon(killerid) == 25)
  90.         {
  91.             SHSkill[killerid]++;
  92.         }
  93.        
  94.         else if(GetPlayerWeapon(killerid) == 26)
  95.         {
  96.             SSSkill[killerid]++;
  97.         }
  98.  
  99.         else if(GetPlayerWeapon(killerid) == 27)
  100.         {
  101.             SPASSkill[killerid]++;
  102.         }
  103.        
  104.         else if(GetPlayerWeapon(killerid) == 28)
  105.         {
  106.             MUSkill[killerid]++;
  107.         }
  108.  
  109.         else if(GetPlayerWeapon(killerid) == 29)
  110.         {
  111.             MPSkill[killerid]++;
  112.         }
  113.        
  114.         else if(GetPlayerWeapon(killerid) == 30)
  115.         {
  116.             AKSkill[killerid]++;
  117.         }
  118.  
  119.         else if(GetPlayerWeapon(killerid) == 31)
  120.         {
  121.             M4Skill[killerid]++;
  122.         }
  123.        
  124.         else if(GetPlayerWeapon(killerid) == 34)
  125.         {
  126.             SRSkill[killerid]++;
  127.         }
  128.         //LEVEL 1
  129.         if(DESkill[killerid] == 10 && GetPlayerWeapon(killerid) == 24)
  130.         {
  131.             SetPlayerSkillLevel(killerid, WEAPONSKILL_DESERT_EAGLE, 1);
  132.             SendClientMessage(killerid, -1, "Sua abilidade com Desert Eagle foi melhorada para o nivel 1!");
  133.         }
  134.  
  135.         else if(PSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 22)
  136.         {
  137.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL, 1);
  138.             SendClientMessage(killerid, -1, "Sua abilidade com Pistola foi melhorada para o nivel 1!");
  139.         }
  140.        
  141.         else if(PSSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 23)
  142.         {
  143.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL_SILENCED, 1);
  144.             SendClientMessage(killerid, -1, "Sua abilidade com Silenced Pistol foi melhorada para o nivel 1!");
  145.         }
  146.        
  147.         else if(SHSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 25)
  148.         {
  149.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SHOTGUN, 1);
  150.             SendClientMessage(killerid, -1, "Sua abilidade com Shotgun foi melhorada para o nivel 1!");
  151.         }
  152.        
  153.         else if(SSSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 26)
  154.         {
  155.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
  156.             SendClientMessage(killerid, -1, "Sua abilidade com Sawnoff Shotgun foi melhorada para o nivel 1!");
  157.         }
  158.        
  159.         else if(SPASSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 27)
  160.         {
  161.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
  162.             SendClientMessage(killerid, -1, "Sua abilidade com SPAS12 Shotgun foi melhorada para o nivel 1!");
  163.         }
  164.        
  165.         else if(MUSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 28)
  166.         {
  167.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MICRO_UZI, 1);
  168.             SendClientMessage(killerid, -1, "Sua abilidade com Micro UZI foi melhorada para o nivel 1!");
  169.         }
  170.        
  171.         else if(MPSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 29)
  172.         {
  173.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MP5, 1);
  174.             SendClientMessage(killerid, -1, "Sua abilidade com MP5 foi melhorada para o nivel 1!");
  175.         }
  176.        
  177.         else if(AKSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 30)
  178.         {
  179.             SetPlayerSkillLevel(killerid, WEAPONSKILL_AK47, 1);
  180.             SendClientMessage(killerid, -1, "Sua abilidade com AK47 foi melhorada para o nivel 1!");
  181.         }
  182.        
  183.         else if(M4Skill[killerid] == 10 && GetPlayerWeapon(killerid) == 31)
  184.         {
  185.             SetPlayerSkillLevel(killerid, WEAPONSKILL_M4, 1);
  186.             SendClientMessage(killerid, -1, "Sua abilidade com M4 foi melhorada para o nivel 1!");
  187.         }
  188.        
  189.         else if(SRSkill[killerid] == 10 && GetPlayerWeapon(killerid) == 34)
  190.         {
  191.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SNIPERRIFLE, 1);
  192.             SendClientMessage(killerid, -1, "Sua abilidade com Sniper Rifle foi melhorada para o nivel 1!");
  193.         }
  194.         //FIM LEVEL 1
  195.        
  196.         //LEVEL 2
  197.         else if(DESkill[killerid] == 20 && GetPlayerWeapon(killerid) == 24)
  198.         {
  199.             SetPlayerSkillLevel(killerid, WEAPONSKILL_DESERT_EAGLE, 2);
  200.             SendClientMessage(killerid, -1, "Sua abilidade com  Desert Eagle foi melhorada para o nivel 2!");
  201.         }
  202.  
  203.         else if(PSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 22)
  204.         {
  205.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL, 2);
  206.             SendClientMessage(killerid, -1, "Sua abilidade com Pistola foi melhorada para o nivel 2!");
  207.         }
  208.  
  209.         else if(PSSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 23)
  210.         {
  211.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL_SILENCED, 2);
  212.             SendClientMessage(killerid, -1, "Sua abilidade com Silenced Pistol foi melhorada para o nivel 2!");
  213.         }
  214.  
  215.         else if(SHSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 25)
  216.         {
  217.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SHOTGUN, 2);
  218.             SendClientMessage(killerid, -1, "Sua abilidade com Shotgun foi melhorada para o nivel 2!");
  219.         }
  220.  
  221.         else if(SSSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 26)
  222.         {
  223.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 2);
  224.             SendClientMessage(killerid, -1, "Sua abilidade com Sawnoff Shotgun foi melhorada para o nivel 2!");
  225.         }
  226.  
  227.         else if(SPASSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 27)
  228.         {
  229.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SPAS12_SHOTGUN, 2);
  230.             SendClientMessage(killerid, -1, "Sua abilidade com SPAS12 Shotgun foi melhorada para o nivel 2!");
  231.         }
  232.  
  233.         else if(MUSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 28)
  234.         {
  235.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MICRO_UZI, 2);
  236.             SendClientMessage(killerid, -1, "Sua abilidade com Micro UZI foi melhorada para o nivel 2!");
  237.         }
  238.  
  239.         else if(MPSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 29)
  240.         {
  241.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MP5, 2);
  242.             SendClientMessage(killerid, -1, "Sua abilidade com MP5 foi melhorada para o nivel 2!");
  243.         }
  244.  
  245.         else if(AKSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 30)
  246.         {
  247.             SetPlayerSkillLevel(killerid, WEAPONSKILL_AK47, 2);
  248.             SendClientMessage(killerid, -1, "Sua abilidade com AK47 foi melhorada para o nivel 2!");
  249.         }
  250.  
  251.         else if(M4Skill[killerid] == 20 && GetPlayerWeapon(killerid) == 31)
  252.         {
  253.             SetPlayerSkillLevel(killerid, WEAPONSKILL_M4, 2);
  254.             SendClientMessage(killerid, -1, "Sua abilidade com M4 foi melhorada para o nivel 2!");
  255.         }
  256.  
  257.         else if(SRSkill[killerid] == 20 && GetPlayerWeapon(killerid) == 34)
  258.         {
  259.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SNIPERRIFLE, 2);
  260.             SendClientMessage(killerid, -1, "Sua abilidade com Sniper Rifle foi melhorada para o nivel 2!");
  261.         }
  262.         //FIM LEVEL 2
  263.        
  264.         //LEVEL 3
  265.         else if(DESkill[killerid] == 30 && GetPlayerWeapon(killerid) == 24)
  266.         {
  267.             SetPlayerSkillLevel(killerid, WEAPONSKILL_DESERT_EAGLE, 3);
  268.             SendClientMessage(killerid, -1, "Sua abilidade com Desert Eagle foi melhorada para o nivel 3!");
  269.         }
  270.  
  271.         else if(PSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 22)
  272.         {
  273.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL, 3);
  274.             SendClientMessage(killerid, -1, "Sua abilidade com Pistola foi melhorada para o nivel 3!");
  275.         }
  276.  
  277.         else if(PSSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 23)
  278.         {
  279.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL_SILENCED, 3);
  280.             SendClientMessage(killerid, -1, "Sua abilidade com Silenced Pistol foi melhorada para o nivel 3!");
  281.         }
  282.  
  283.         else if(SHSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 25)
  284.         {
  285.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SHOTGUN, 3);
  286.             SendClientMessage(killerid, -1, "Sua abilidade com Shotgun foi melhorada para o nivel 3!");
  287.         }
  288.  
  289.         else if(SSSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 26)
  290.         {
  291.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 3);
  292.             SendClientMessage(killerid, -1, "Sua abilidade com Sawnoff Shotgun foi melhorada para o nivel 3!");
  293.         }
  294.  
  295.         else if(SPASSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 27)
  296.         {
  297.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SPAS12_SHOTGUN, 3);
  298.             SendClientMessage(killerid, -1, "Sua abilidade com SPAS12 Shotgun foi melhorada para o nivel 3!");
  299.         }
  300.  
  301.         else if(MUSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 28)
  302.         {
  303.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MICRO_UZI, 3);
  304.             SendClientMessage(killerid, -1, "Sua abilidade com Micro UZI foi melhorada para o nivel 3!");
  305.         }
  306.  
  307.         else if(MPSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 29)
  308.         {
  309.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MP5, 3);
  310.             SendClientMessage(killerid, -1, "Sua abilidade com MP5 foi melhorada para o nivel 3!");
  311.         }
  312.  
  313.         else if(AKSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 30)
  314.         {
  315.             SetPlayerSkillLevel(killerid, WEAPONSKILL_AK47, 3);
  316.             SendClientMessage(killerid, -1, "Sua abilidade com AK47 foi melhorada para o nivel 3!");
  317.         }
  318.  
  319.         else if(M4Skill[killerid] == 30 && GetPlayerWeapon(killerid) == 31)
  320.         {
  321.             SetPlayerSkillLevel(killerid, WEAPONSKILL_M4, 3);
  322.             SendClientMessage(killerid, -1, "Sua abilidade com M4 foi melhorada para o nivel 3!");
  323.         }
  324.  
  325.         else if(SRSkill[killerid] == 30 && GetPlayerWeapon(killerid) == 34)
  326.         {
  327.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SNIPERRIFLE, 3);
  328.             SendClientMessage(killerid, -1, "Sua abilidade com Sniper Rifle foi melhorada para o nivel 3!");
  329.         }
  330.         //FIM LEVEL 3
  331.        
  332.         //LEVEL 4
  333.         else if(DESkill[killerid] == 40 && GetPlayerWeapon(killerid) == 24)
  334.         {
  335.             SetPlayerSkillLevel(killerid, WEAPONSKILL_DESERT_EAGLE, 4);
  336.             SendClientMessage(killerid, -1, "Sua abilidade com Desert Eagle foi melhorada para o nivel 4!");
  337.         }
  338.  
  339.         else if(PSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 22)
  340.         {
  341.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL, 4);
  342.             SendClientMessage(killerid, -1, "Sua abilidade com Pistola foi melhorada para o nivel 4!");
  343.         }
  344.  
  345.         else if(PSSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 23)
  346.         {
  347.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL_SILENCED, 4);
  348.             SendClientMessage(killerid, -1, "Sua abilidade com Silenced Pistol foi melhorada para o nivel 4!");
  349.         }
  350.  
  351.         else if(SHSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 25)
  352.         {
  353.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SHOTGUN, 4);
  354.             SendClientMessage(killerid, -1, "Sua abilidade com Shotgun foi melhorada para o nivel 4!");
  355.         }
  356.  
  357.         else if(SSSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 26)
  358.         {
  359.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 4);
  360.             SendClientMessage(killerid, -1, "Sua abilidade com Sawnoff Shotgun foi melhorada para o nivel 4!");
  361.         }
  362.  
  363.         else if(SPASSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 27)
  364.         {
  365.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SPAS12_SHOTGUN, 4);
  366.             SendClientMessage(killerid, -1, "Sua abilidade com SPAS12 Shotgun foi melhorada para o nivel 4!");
  367.         }
  368.  
  369.         else if(MUSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 28)
  370.         {
  371.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MICRO_UZI, 4);
  372.             SendClientMessage(killerid, -1, "Sua abilidade com Micro UZI foi melhorada para o nivel 4!");
  373.         }
  374.  
  375.         else if(MPSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 29)
  376.         {
  377.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MP5, 4);
  378.             SendClientMessage(killerid, -1, "Sua abilidade com MP5 foi melhorada para o nivel 4!");
  379.         }
  380.  
  381.         else if(AKSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 30)
  382.         {
  383.             SetPlayerSkillLevel(killerid, WEAPONSKILL_AK47, 4);
  384.             SendClientMessage(killerid, -1, "Sua abilidade com AK47 foi melhorada para o nivel 4!");
  385.         }
  386.  
  387.         else if(M4Skill[killerid] == 40 && GetPlayerWeapon(killerid) == 31)
  388.         {
  389.             SetPlayerSkillLevel(killerid, WEAPONSKILL_M4, 4);
  390.             SendClientMessage(killerid, -1, "Sua abilidade com M4 foi melhorada para o nivel 4!");
  391.         }
  392.  
  393.         else if(SRSkill[killerid] == 40 && GetPlayerWeapon(killerid) == 34)
  394.         {
  395.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SNIPERRIFLE, 4);
  396.             SendClientMessage(killerid, -1, "Sua abilidade com Sniper Rifle foi melhorada para o nivel 4!");
  397.         }
  398.         //FIM LEVEL 4
  399.        
  400.         //LEVEL 5
  401.         else if(DESkill[killerid] == 50 && GetPlayerWeapon(killerid) == 24)
  402.         {
  403.             SetPlayerSkillLevel(killerid, WEAPONSKILL_DESERT_EAGLE, 5);
  404.             SendClientMessage(killerid, -1, "Sua abilidade com Desert Eagle foi melhorada para o nivel 5!");
  405.         }
  406.  
  407.         else if(PSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 22)
  408.         {
  409.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL, 5);
  410.             SendClientMessage(killerid, -1, "Sua abilidade com Pistola foi melhorada para o nivel 5!");
  411.         }
  412.  
  413.         else if(PSSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 23)
  414.         {
  415.             SetPlayerSkillLevel(killerid, WEAPONSKILL_PISTOL_SILENCED, 5);
  416.             SendClientMessage(killerid, -1, "Sua abilidade com Sileced Pistol foi melhorada para o nivel 5!");
  417.         }
  418.  
  419.         else if(SHSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 25)
  420.         {
  421.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SHOTGUN, 5);
  422.             SendClientMessage(killerid, -1, "Sua abilidade com Shotgun foi melhorada para o nivel 5!");
  423.         }
  424.  
  425.         else if(SSSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 26)
  426.         {
  427.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 5);
  428.             SendClientMessage(killerid, -1, "Sua abilidade com Sawoff Shotgun foi melhorada para o nivel 5!");
  429.         }
  430.  
  431.         else if(SPASSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 27)
  432.         {
  433.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SPAS12_SHOTGUN, 5);
  434.             SendClientMessage(killerid, -1, "Sua abilidade com SPAS12 Shotgun foi melhorada para o nivel 5!");
  435.         }
  436.  
  437.         else if(MUSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 28)
  438.         {
  439.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MICRO_UZI, 5);
  440.             SendClientMessage(killerid, -1, "Sua abilidade com Micro UZI foi melhorada para o nivel 5!");
  441.         }
  442.  
  443.         else if(MPSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 29)
  444.         {
  445.             SetPlayerSkillLevel(killerid, WEAPONSKILL_MP5, 5);
  446.             SendClientMessage(killerid, -1, "Sua abilidade com MP5 foi melhorada para o nivel 5!");
  447.         }
  448.  
  449.         else if(AKSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 30)
  450.         {
  451.             SetPlayerSkillLevel(killerid, WEAPONSKILL_AK47, 5);
  452.             SendClientMessage(killerid, -1, "Sua abilidade com AK47 foi melhorada para o nivel 5!");
  453.         }
  454.  
  455.         else if(M4Skill[killerid] == 50 && GetPlayerWeapon(killerid) == 31)
  456.         {
  457.             SetPlayerSkillLevel(killerid, WEAPONSKILL_M4, 5);
  458.             SendClientMessage(killerid, -1, "Sua abilidade com M4 foi melhorada para o nivel 5!");
  459.         }
  460.  
  461.         else if(SRSkill[killerid] == 50 && GetPlayerWeapon(killerid) == 34)
  462.         {
  463.             SetPlayerSkillLevel(killerid, WEAPONSKILL_SNIPERRIFLE, 5);
  464.             SendClientMessage(killerid, -1, "Sua abilidade com Sniper Rifle foi melhorada para o nivel 5!");
  465.         }
  466.     }
  467.     return 1;
  468. }
  469.  
  470. public OnPlayerCommandText(playerid, cmdtext[])
  471. {
  472.     new nome[MAX_PLAYER_NAME];
  473.     GetPlayerName(playerid, nome, MAX_PLAYER_NAME);
  474.     format(String, sizeof(String), "O player %s(ID %d) desligou o Weapon Skill System",nome, playerid);
  475.     if (strcmp("/ativarwss", cmdtext, true, 10) == 0)
  476.     {
  477.         if(IsPlayerAdmin(playerid))
  478.         {
  479.             if(FSAtivado == 0 )
  480.             {
  481.                 FSAtivado = 1;
  482.                 print(String);
  483.                 SendClientMessage(playerid, -1, "Weapon Skill System desativado com sucesso!");
  484.             }
  485.             else if(FSAtivado == 1)
  486.             {
  487.                 SendClientMessage(playerid, -1, "Weapon Skill System ativado com sucesso!");
  488.             }
  489.         } else {
  490.             SendClientMessage(playerid, -1, "Você não é um administrador!");
  491.         }
  492.         return 1;
  493.     }
  494.  
  495.     if (strcmp("/1", cmdtext, true, 10) == 0)
  496.     {
  497.         SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 5);
  498.         SendClientMessage(playerid, -1, "Sua abilidade com Desert Eagle foi melhorada para o nivel 5!");
  499.         return 1;
  500.     }
  501.  
  502.     if (strcmp("/2", cmdtext, true, 10) == 0)
  503.     {
  504.         SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
  505.         SendClientMessage(playerid, -1, "Sua abilidade com Desert Eagle foi melhorada para o nivel 1!");
  506.         return 1;
  507.     }
  508.     return 0;
  509. }
  510.  
  511. public WSSLoad(playerid)
  512. {
  513.     new nome[MAX_PLAYER_NAME];
  514.     GetPlayerName(playerid, nome, MAX_PLAYER_NAME);
  515.     format(String, sizeof(String), "Player Skill/%s.ini",nome);
  516.     if(DOF2_FileExists(String))
  517.     {
  518.         DESkill[playerid] = DOF2_GetInt(String, "DESkill");
  519.         PSkill[playerid] = DOF2_GetInt(String, "SPSkill");
  520.         PSSkill[playerid] = DOF2_GetInt(String, "PSSkill");
  521.         SHSkill[playerid] = DOF2_GetInt(String, "SHSkill");
  522.         SSSkill[playerid] = DOF2_GetInt(String, "SSSkill");
  523.         SPASSkill[playerid] = DOF2_GetInt(String, "SPASSkill");
  524.         MUSkill[playerid] = DOF2_GetInt(String, "MUSkill");
  525.         MPSkill[playerid] = DOF2_GetInt(String, "MPSkill");
  526.         AKSkill[playerid] = DOF2_GetInt(String, "AKSkill");
  527.         M4Skill[playerid] = DOF2_GetInt(String, "M4Skill");
  528.         SRSkill[playerid] = DOF2_GetInt(String, "SRSkill");
  529.         DOF2_SaveFile();
  530.      }
  531.     else {
  532.         DOF2_CreateFile(String);
  533.         DOF2_SetInt(String, "DESkill", DESkill[playerid]);
  534.         DOF2_SetInt(String, "SPSkill", PSkill[playerid]);
  535.         DOF2_SetInt(String, "PSSkill", PSSkill[playerid]);
  536.         DOF2_SetInt(String, "SHSkill", SHSkill[playerid]);
  537.         DOF2_SetInt(String, "SSSkill", SSSkill[playerid]);
  538.         DOF2_SetInt(String, "SPASSkill", SPASSkill[playerid]);
  539.         DOF2_SetInt(String, "MUSkill", MUSkill[playerid]);
  540.         DOF2_SetInt(String, "MPSkill", MPSkill[playerid]);
  541.         DOF2_SetInt(String, "AKSkill", AKSkill[playerid]);
  542.         DOF2_SetInt(String, "M4Skill", M4Skill[playerid]);
  543.         DOF2_SetInt(String, "SRSkill", SRSkill[playerid]);
  544.         DOF2_SaveFile();
  545.     }
  546.     return 1;
  547. }
  548. public WSSSave(playerid)
  549. {
  550.     new nome[MAX_PLAYER_NAME];
  551.     GetPlayerName(playerid, nome, MAX_PLAYER_NAME);
  552.     format(String, sizeof(String), "Player Skill/%s.ini",nome);
  553.     if(DOF2_FileExists(String))
  554.     {
  555.         DOF2_SetInt(String, "DESkill", DESkill[playerid]);
  556.         DOF2_SetInt(String, "SPSkill", PSkill[playerid]);
  557.         DOF2_SetInt(String, "PSSkill", PSSkill[playerid]);
  558.         DOF2_SetInt(String, "SHSkill", SHSkill[playerid]);
  559.         DOF2_SetInt(String, "SSSkill", SSSkill[playerid]);
  560.         DOF2_SetInt(String, "SPASSkill", SPASSkill[playerid]);
  561.         DOF2_SetInt(String, "MUSkill", MUSkill[playerid]);
  562.         DOF2_SetInt(String, "MPSkill", MPSkill[playerid]);
  563.         DOF2_SetInt(String, "AKSkill", AKSkill[playerid]);
  564.         DOF2_SetInt(String, "M4Skill", M4Skill[playerid]);
  565.         DOF2_SetInt(String, "SRSkill", SRSkill[playerid]);
  566.         DOF2_SaveFile();
  567.     }
  568.     else {
  569.         DOF2_CreateFile(String);
  570.         DOF2_SetInt(String, "DESkill", DESkill[playerid]);
  571.         DOF2_SetInt(String, "SPSkill", PSkill[playerid]);
  572.         DOF2_SetInt(String, "PSSkill", PSSkill[playerid]);
  573.         DOF2_SetInt(String, "SHSkill", SHSkill[playerid]);
  574.         DOF2_SetInt(String, "SSSkill", SSSkill[playerid]);
  575.         DOF2_SetInt(String, "SPASSkill", SPASSkill[playerid]);
  576.         DOF2_SetInt(String, "MUSkill", MUSkill[playerid]);
  577.         DOF2_SetInt(String, "MPSkill", MPSkill[playerid]);
  578.         DOF2_SetInt(String, "AKSkill", AKSkill[playerid]);
  579.         DOF2_SetInt(String, "M4Skill", M4Skill[playerid]);
  580.         DOF2_SetInt(String, "SRSkill", SRSkill[playerid]);
  581.         DOF2_SaveFile();
  582.     }
  583.     return 1;
  584. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement