Hy, change this in the gun store server sided script file:
addEvent( "BuyW", true)
addEventHandler( "BuyW", getRootElement(),
function ( tPM , gWA, wID )
local PlayerMoney = getPlayerMoney(source)
if PlayerMoney >= tPM then
giveWeapon (source, wID, gWA )
takePlayerMoney(source, tPM)
setPedWeaponSlot(source, getSlotFromWeapon(tonumber(wID)))
outputChatBox ( "#FFFF1A*** You Bought Weapon By : "..tonumber(tPM).."$ ***", source, 255, 0, 0, true )
else
outputChatBox("you don't have $"..tonumber(tPM).." to buy This Weapon !", source, 255, 0, 0)
end
end)
to this:
addEvent( "BuyW", true)
addEventHandler( "BuyW", getRootElement(),
function ( tPM , gWA, wID )
local data = getElementData(source, "moneycoins");
thePoints = tonumber(data);
if thePoints >= tPM then
giveWeapon (source, wID, gWA )
setElementData(source, "moneycoins", data-tPM)
setPedWeaponSlot(source, getSlotFromWeapon(tonumber(wID)))
outputChatBox ( "#FFFF1A*** You Bought Weapon By : "..tonumber(tPM).."$ ***", source, 255, 0, 0, true )
else
outputChatBox("you don't have $"..tonumber(tPM).." to buy This Weapon !", source, 255, 0, 0)
end
end)