Advertisement
Guest User

Untitled

a guest
May 26th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.04 KB | None | 0 0
  1. Į ONPLAYERDEATH ĮDĖJAU ŠITĄ
  2.  
  3. function drop_player_weapons(playerid)
  4. {
  5.     new Float: Pos[3], string[500], gunname[32], sweapon, sammo, idd, result;
  6.     GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  7.  
  8.     for(new i = 0; i < 12; i++)
  9.     {
  10.         GetPlayerWeaponData(playerid, i, sweapon, sammo);
  11.         if(sweapon != 0)
  12.         {
  13.             if(sweapon == 24 || sweapon == 25 || sweapon == 29 || sweapon == 30 || sweapon == 33 || sweapon == 34)
  14.             {
  15.                 result++;
  16.                 idd = CheckIDEmpty();
  17.                 DropInfo[idd][ID] = CreatePickup(WeaponObject(sweapon), 1, Pos[0]+result, Pos[1]+2, Pos[2], -1);
  18.                 DropInfo[idd][Weapon] = sweapon;
  19.                 DropInfo[idd][Ammo] = sammo;
  20.                 GetWeaponName(sweapon, gunname, sizeof(gunname));
  21.                 format(string, sizeof(string), "{ffff00}• {ffffff}Ginklas: {ffff00}%s\n{ffff00}• {ffffff}Kulkų: {ffff00}%d vnt.\n{ffff00}• {ffffff}Norėdami paimti ginklą rašykite /paimtig %d", gunname, sammo, DropInfo[idd][ID]);
  22.                 DropInfo[idd][Label] = Create3DTextLabel(string, -1, Pos[0]+result, Pos[1]+2, Pos[2], 10.0, 0, 0);
  23.             }
  24.         }
  25.     }
  26.     ResetPlayerWeapons(playerid);
  27.     return 1;
  28. }
  29.  
  30.  
  31. CMD:paimtig(playerid, params[])
  32. {
  33.     new idas;
  34.     if(sscanf(params, "d", idas)) return SendClientMessage(playerid, 0xFFFF00FF, "• {ffffff}Paimti numestą ginklą /paimtig [ID]");
  35.     if(DropInfo[idas][ID] != -1)
  36.     {
  37.         print("d");
  38.         new gunname[32], string[128];
  39.         GetWeaponName(DropInfo[idas][Weapon], gunname, sizeof(gunname));
  40.         format(string, sizeof(string), "• {ffffff}Pasiemėte ginklą {ffff00}%s {ffffff}({ffff00}%d {ffffff}kulkų).", gunname, DropInfo[idas][Ammo]);
  41.         SendClientMessage(playerid, 0xFFFF00FF, string);
  42.         GivePlayerWeapon(playerid, DropInfo[idas][Weapon], DropInfo[idas][Ammo]);
  43.  
  44.         DestroyPickup(DropInfo[idas][ID]);
  45.         Delete3DTextLabel(DropInfo[idas][Label]);
  46.         DropInfo[idas][ID] = -1;
  47.         PlayerPlaySound(playerid, 1150, 0.0, 0.0, 10.0);
  48.     }
  49.     return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement