Advertisement
Day_Mito

Skills msgs

Feb 4th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.58 KB | None | 0 0
  1. // enum player info
  2. pExp,
  3. pLevel,
  4. pSkill[8], // 0 = eagle, 1 = shot, 2 = spas, 3 = mp5, 4 = ak, 5 = m4, 6 = rifle, 7 = sniper
  5. pSkillLevel[8] // 0 = eagle, 1 = shot, 2 = spas, 3 = mp5, 4 = ak, 5 = m4, 6 = rifle, 7 = sniper
  6. // topo gm
  7. #define XP 50 // valor multiplicado pelo level
  8. #define SKILL 8 // valor multiplicado pela skill
  9. new Spree[MAX_PLAYERS];
  10. new TempoSpree[MAX_PLAYERS];
  11. new SpreeNome[7][35] = {
  12. {"~n~~n~~r~<~y~ Respect Over ~r~>"},
  13. {"~n~~n~~r~<~y~ Respect Spree ~r~>"},
  14. {"~n~~n~~r~<~y~ Playa ~r~>"},
  15. {"~n~~n~~r~<~y~ Homie ~r~>"},
  16. {"~n~~n~~r~<~y~ Jacker ~r~>"},
  17. {"~n~~n~~r~<~y~ Criminal ~r~>"},
  18. {"~n~~n~~r~<~y~ Gangsta ~r~>"}
  19. };
  20. new DanoArma[8][5] = {
  21. {}, // aki vc vai colocar o dano q quer na arma ex: 30,40,50,60,70 ou seja cada 1 numeroo e um skill level
  22. {}, // pode por assim tb random(30,40),random(40,50),random(50,60),random(60,70) ou seja valor aleatorio
  23. {},
  24. {},
  25. {},
  26. {},
  27. {},
  28. {}
  29. };
  30.  
  31. // algum settimer q roda osplayers a cada 1 segndo
  32. if(TempoSpree[playerid] > 0)
  33. {
  34.     TempoSpree[playerid] --;
  35.     if(TempoSpree[playerid] == 0)
  36.     {
  37.         GameTextForPlayer(playerid,SpreeNome[0],2000,3);
  38.     }
  39. }
  40. // OnPlayerConnect
  41. Spree[killerid] = 0;
  42. TempoSpree[killerid] = 0;
  43.  
  44. // OnPlayerDeath
  45.     Spree[killerid] += 1;
  46.     TempoSpree[killerid] = 180; // 3 min em segundos
  47.     if(Spree[killerid] <= sizeof(SpreeNome))
  48.     {
  49.         GameTextForPlayer(playerid,SpreeNome[Spree[killerid]],2000,6);
  50.     }
  51.     if(playerid != INVALID_PLAYER_ID)   VerificarArmas(killerid);  
  52.  
  53. // OnPlayerTakeDamage
  54.    
  55.     Player[issuerid][pExp] += floatround(amount);
  56.     if(Player[issuerid][pExp] >= Player[issuerid][pLevel] * XP + Player[issuerid][pExp] / 1.5)
  57.     {
  58.         Player[issuerid][pLevel] += 1;
  59.         SendClientMessage(issuerid,-1,"{00FF00}Parabéns você subiu de nivel");
  60.     }
  61.     for(new arma; arma < 8; arma ++)
  62.     {
  63.         if(GetPlayerarma(issuerid) == ArmasSkill[arma])
  64.         {
  65.             amount = Danoarma[arma][Player[issuerid][SkillLevel][arma]];   
  66.         }
  67.     }
  68.  
  69. // Funcao Fim do GM
  70. VerificarArmas(playerid)
  71. {
  72.     for(new arma; arma < 8; arma ++)
  73.     {
  74.         if(GetPlayerarma(issuerid) == ArmasSkill[arma])
  75.         {
  76.             new a = GetPlayerWeapon(playerid);
  77.             if(a == ArmasSkill[arma])
  78.             {
  79.                 if(Player[playerid][pSkill][arma] >= 5) return 1;
  80.                 Player[playerid][pSkill][arma] += 1;
  81.                 if(Player[playerid][pSkill][arma] >= Player[playerid][pSkillLevel][0] * SKILL)
  82.                 {
  83.                     Player[playerid][pSkill][arma] = 0;
  84.                     new str[128];
  85.                     format(str,128,"{00FF00}Parabéns sua Skill com a arma %s aumentou um nivel.",WeaponsNames[a]);
  86.                     SendClientMessage(playerid,-1,str);
  87.                     Player[playerid][pSkillLevel][arma] += 1;
  88.                 }
  89.             }
  90.         }
  91.     }
  92.     return 0;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement