daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Sep 23rd, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new sWeapon[][] = // Weapon ID and Pickup ID 28 TOTAL
  2. {
  3. { 2,333 }, //WEAPON_GOLFCLUB
  4. { 3,334 },//WEAPON_NITESTICK
  5. { 5,336 },//WEAPON_BAT
  6. { 6,337 },//WEAPON_SHOVEL
  7. { 7,338 },//WEAPON_POOLSTICK
  8. { 8,339 },//WEAPON_KATANA
  9. { 9,341 },//WEAPON_CHAINSAW
  10. { 10,321 },//WEAPON_DILDO
  11. { 11,324 },//WEAPON_DILDO2
  12. { 16,342 },//WEAPON_GRENADE
  13. { 18,344 },//WEAPON_MOLTOV
  14. { 22,346 },//WEAPON_COLT45
  15. { 23,347 },//WEAPON_SILENCED
  16. { 24,348 },//WEAPON_DEAGLE
  17. { 25,349 },//WEAPON_SHOTGUN
  18. { 26,350 },//WEAPON_SAWEDOFF
  19. { 27,351 },//WEAPON_SHOTGSPAZ12
  20. { 28,352 },//WEAPON_UZI
  21. { 29,353 },//WEAPON_MP5
  22. { 30,355 },//WEAPON_AK47
  23. { 31,356 },//WEAPON_M4
  24. { 32,372 },//WEAPON_TEC9
  25. { 33,357 },//WEAPON_RIFLE
  26. { 34,358 },//WEAPON_SNIPER
  27. { 35,359 },//WEAPON_ROCKETLAUNCHER
  28. { 37,361 },//WEAPON_FLAMETHROWER
  29. {0, 1279 }, // AMMO
  30. {0, 1242 } // BODY ARMOUR
  31. };
  32.  
  33. CreateRandomLoot()
  34. {
  35.     new LootID;
  36.     for(new i; i < sizeof(SZ1LootSpawns); i++)
  37.     {
  38.         LootID = random(TOTAL_LOOT_ITEMS);
  39.         LootSpawn[i] = CreatePickup(sWeapon[LootID][1],1,SZ1LootSpawns[i][0],SZ1LootSpawns[i][1],SZ1LootSpawns[i][2],0);
  40.     }
  41.     return 1;
  42. }
  43.  
  44. public OnPlayerPickUpPickup(playerid, pickupid)
  45. {
  46.     for(new i; i < sizeof(LootSpawn); i++)
  47.     {
  48.         if(pickupid == LootSpawn[i])
  49.         {
  50.             SendClientMessage(playerid,COLOR_RED,"Pickup weapon");
  51.             new WeaponID = sWeapon[LootSpawn[i]][0];
  52.             GivePlayerWeapon(playerid,WeaponID,30);
  53.             printf("Weapon ID: %d",WeaponID);
  54.             DestroyPickup(LootSpawn[i]);
  55.         }
  56.     }
  57.     return 1;
  58. }
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