Advertisement
RogerGomesCosta

Untitled

Aug 14th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.21 KB | None | 0 0
  1. enum DROP_WEAPON_ENUM
  2. {
  3.     DROP_WEAPO
  4.     DROP_WEAPON_ID[13],
  5.     DROP_WEAPON_AMMO[13],
  6.     DROP_WEAPON_GANG,
  7.     DROP_WEAPON_CREATE,
  8. }
  9. new DROP_WEAPÓN[][DROP_WEAPON_ENUM];
  10.  
  11. public OnPlayerDeath(playerid, killerid, reason)
  12. {
  13.    
  14.     new Float:DEATH_POS[3];
  15.     GetPlayerPos(playerid, DEATH_POS[0], DEATH_POS[1], DEATH_POS[2]);
  16.  
  17.     if(killerid != INVALID_PLAYER_ID && PLAYER_INFO[playerid][P_SHOOTED])
  18.     {
  19.         PLAYER_INFO[killerid][P_KILLS] ++;
  20.         GANG_INFO[PLAYER_INFO[killerid][P_GANGID]][GKILLS] ++;
  21.  
  22.         PLAYER_INFO[playerid][P_DEATHS] ++;
  23.         GANG_INFO[PLAYER_INFO[playerid][P_GANGID]][GDEATHS] ++;
  24.        
  25.         for(new i = 0; i < 100; i++)
  26.         {
  27.  
  28.             if(DROP_WEAPON[i][DROP_WEAPON_CREATE] == -1) // se não tiver nenhuma pickup nesse slot
  29.             {
  30.                 DROP_WEAPON[i][DROP_WEAPON_GANG] = PLAYER_INFO[killerid][P_GANGID]; // Deixa a pickup acessiível só pra gangue do killerid
  31.                 for(new k = 0; k < 13; k++)
  32.                 {
  33.                     GetPlayerWeaponData(playerid, k, DROP_WEAPON[i][DROP_WEAPON_ID][k], DROP_WEAPON[i][DROP_WEAPON_AMMO][k]);
  34.                     DROP_WEAPON[i][DROP_WEAPON_CREATE] = CreatePickup(GetPlayerWeaponSlot(DROP_WEAPON[i][DROP_WEAPON_ID][k]), 1, DEATH_POS[0], DEATH_POS[1], DEATH_POS[2], 0);
  35.                 }
  36.             }
  37.         }
  38.     }
  39.  
  40.     return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement