SHARE
TWEET
Untitled
a guest
Jan 29th, 2018
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- function DrawText2(text)
- SetTextFont(0)
- SetTextProportional(1)
- SetTextScale(0.0, 0.50)
- SetTextDropshadow(1, 0, 0, 0, 255)
- SetTextEdge(1, 0, 0, 0, 255)
- SetTextDropShadow()
- SetTextOutline()
- SetTextEntry("STRING")
- AddTextComponentString(text)
- DrawText(0.40, 0.10)
- end
- function getInventoryWeight(pPlayer)
- local weight = 0
- local itemWeight = 0
- if #pPlayer.inventory > 0 then
- for i=1, #pPlayer.inventory, 1 do
- if pPlayer.inventory[i] ~= nil then
- itemWeight = Config.DefaultWeight
- if arrayWeight[pPlayer.inventory[i].name] ~= nil then
- itemWeight = arrayWeight[pPlayer.inventory[i].name]
- end
- weight = weight + (itemWeight * pPlayer.inventory[i].count)
- end
- end
- end
- return weight
- end
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- local sizeInv = getInventoryWeight(PlayerId())
- DrawText2("InvWeight: ~r~".. sizeInv .." ~w~.")
- end
- end)
RAW Paste Data

