SHARE
TWEET

Untitled

Dravizz Apr 15th, 2020 892 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enum dInfo
  2. {
  3.     ID,
  4.     Weapon,
  5.     Text3D: Label,
  6.     HPX
  7. }
  8. new GunPickup[MAX_PICKUPS][dInfo];
  9.  
  10.  
  11.  
  12. OnPlayerPickUpPickup
  13.  
  14.     new string[128];
  15.     for(new i = 0; i < MAX_PICKUPS; i++)
  16.     {
  17.         if(pickupid == GunPickup[i][ID] && GunPickup[i][ID] != -1)
  18.         {
  19.             if(GunPickup[i][HPX] == 1)
  20.             {
  21.                 SendClientMessage(playerid, 0x00FF00FF, "• {ffffff}Pasiemei numirusio žmogaus gyvybes.");
  22.                 printf("[HEAL] %s paeme numirusio zmogaus gyvybes",GetPlayerNameEx(playerid));
  23.                 format(string,sizeof(string),"%s Paėmė numirusio žmogaus gyvybes.",GetPlayerNameEx(playerid));
  24.                 SendMessageToKROVIN(0xFFFFFFFF,string);
  25.                 SetPlayerArmour(playerid, 99);
  26.             }
  27.             else
  28.             {
  29.                 new gunname[32];
  30.                 GetWeaponName(GunPickup[i][Weapon], gunname, sizeof(gunname));
  31.                 format(string, sizeof(string), "• {ffffff}Pasiemei numirusio žmogaus {00FF00}%s {ffffff}ginklą.", gunname);
  32.                 SendClientMessage(playerid, 0x00FF00FF, string);
  33.                 format(string,sizeof(string),"%s Paėmė numirusio žmogaus ginklą %s.",GetPlayerNameEx(playerid), gunname);
  34.                 SendMessageToKROVIN(0xFFFFFFFF,string);
  35.                 printf("[GUN] %s paeme numirusio zmogaus ginkla %s",GetPlayerNameEx(playerid), gunname);
  36.                 GivePlayerWeapon(playerid, GunPickup[i][Weapon], 100);
  37.             }
  38.             DestroyPickup(GunPickup[i][ID]);
  39.             Delete3DTextLabel(GunPickup[i][Label]);
  40.             GunPickup[i][ID] = -1;
  41.             GunPickup[i][HPX] = 0;
  42.         }
  43.     }
  44.  
  45. OnPlayerDeath
  46.  
  47. if(Esu saugykloje])
  48.     {
  49.         new Float: Pos[3], string[128], gunname[32], sweapon, sammo, idd, result;
  50.     GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  51.  
  52.         idd = CheckIDEmpty();
  53.         GunPickup[idd][ID] = CreatePickupA(1242, 23, Pos[0], Pos[1]+2, Pos[2], -1);
  54.         GunPickup[idd][Label] = Create3DTextLabel("{90F037}Šarvai", 0xFFFFFFFF, Pos[0], Pos[1]+2, Pos[2], 10.0, 0, 0);
  55.         GunPickup[idd][HPX] = 1;
  56.  
  57.         for(new i = 0; i < 12; i++)
  58.         {
  59.             GetPlayerWeaponData(playerid, i, sweapon, sammo);
  60.             if(sweapon != 0)
  61.             {
  62.                if(sweapon == 24 || sweapon == 25 || sweapon == 29 || sweapon == 30 || sweapon == 34)
  63.                {
  64.                     if(sammo >= 100)
  65.                     {
  66.                         result++;
  67.                         idd = CheckIDEmpty();
  68.                         GunPickup[idd][ID] = CreatePickupA(WeaponObject(sweapon), 23, Pos[0]+result, Pos[1]+2, Pos[2]);
  69.                         GunPickup[idd][Weapon] = sweapon;
  70.                         GetWeaponName(sweapon, gunname, sizeof(gunname));
  71.                         format(string, sizeof(string), "{00FF00}%s", gunname);
  72.                         GunPickup[idd][Label] = Create3DTextLabel(string, 0x00FF00FF, Pos[0]+result, Pos[1]+2, Pos[2], 10.0, 0, 0);
  73.                     }
  74.                 }
  75.             }
  76.         }
  77.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top