Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler("onPlayerMoveItemInInventoryFast", root, function(itemName, loot, value)
- local itemPlus = value;
- if (itemName == "M1911 Mag") then itemPlus = 10*value;
- elseif (itemName == "M9 SD Mag") then itemPlus = 15*value;
- elseif (itemName == "Desert Eagle Mag") then itemPlus = 7*value;
- elseif (itemName == "PDW Mag") then itemPlus = 30*value;
- elseif (itemName == "MP5A5 Mag") then itemPlus = 20*value;
- elseif (itemName == "AS50 Mag") then itemPlus = 10*value;
- elseif (itemName == "CZ550 Mag") then itemPlus = 10*value;
- elseif (itemName == "Mosin 9130 Mag") then itemPlus = 35*value;
- elseif (itemName == "M24 Mag") then itemPlus = 10*value;
- elseif (itemName == "KVSK Mag") then itemPlus = 15*value;
- elseif (itemName == "M107 Mag") then itemPlus = 5*value;
- elseif (itemName == "SVD Dragunov Camo Mag") then itemPlus = 25*value;
- elseif (itemName == "MK 48 Mod 0 Mag") then itemPlus = 100*value;
- elseif (itemName == "MG36 Mag") then itemPlus = 100*value;
- elseif (itemName == "PKM Mag") then itemPlus = 100*value;
- elseif (itemName == "L85A2 Holo Mag") then itemPlus = 100*value;
- elseif (itemName == "AK-107 Mag") then itemPlus = 30*value;
- elseif (itemName == "FN SCAR-L Mag") then itemPlus = 30*value;
- elseif (itemName == "AKM Mag") then itemPlus = 30*value;
- elseif (itemName == "SA-58V ACOG Mag") then itemPlus = 30*value;
- elseif (itemName == "AKS-74U Mag") then itemPlus = 30*value;
- elseif (itemName == "M4A1 Tactical Mag") then itemPlus = 20*value;
- elseif (itemName == "1866 Slug") then itemPlus = 7*value;
- elseif (itemName == "2Rnd. Slug") then itemPlus = 2*value;
- elseif (itemName == "SPAZ-12 Pellet") then itemPlus = 7*value;
- elseif (itemName == "DMR Mag") then itemPlus = 5*value;
- elseif (itemName == "SKS-45 Mag") then itemPlus = 10*value;
- end
- if loot then
- local players = getElementsWithinColShape (loot,"player")
- if #players > 1 then
- triggerServerEvent("onPlayerChangeLoot",getRootElement(),loot)
- triggerEvent("gs_notification_text",getLocalPlayer(),"error","You cant take items because other player is too close!")
- return
- end
- setElementData(getLocalPlayer(),itemName,(getElementData(getLocalPlayer(),itemName) or 0)+itemPlus)
- if itemPlus == 0 then
- setElementData(loot,itemName,getElementData(loot,itemName)-0)
- else
- setElementData(loot,itemName,getElementData(loot,itemName)-value)
- end
- end
- if getElementData(loot, "itemloot") then
- triggerServerEvent("refreshItemLoot", getRootElement(), loot, getElementData(loot, "parent"));
- end
- end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement