use "EDIT" button
addEvent("buyHay", true)
addEventHandler("buyHay", getRootElement(),
function()
local playerCash = loadPlayerData (source,"cash")
if (tonumber(playerCash) > 19999) then
savePlayerData (source,"cash",loadPlayerData(source,"cash") -20000)
x,y,z = getElementPosition( source )
createObject ( 3374, x, y, z, 120, 0, 0 )
outputChatBox("Hay Successfully droped", source, 255, 255, 0, true)
else
outputChatBox("Not enough money.", source, 255, 0, 0, true)
end
end
)
try that.