function onClientSuccessBuysItem(target,item,currency,amount,price)
setElementData(target,item,getElementData(target,item)+amount)
setElementData(target,"money",getElementData(target,"money")-price) -- or takePlayerMoney(target, price)
end
addEvent("DayZPH:onClientSuccessBuysItem",true)
addEventHandler("DayZPH:onClientSuccessBuysItem",getRootElement(),onClientSuccessBuysItem)