may be this
addEvent("buy2", true)
addEventHandler("buy2", getRootElement(),
function()
if ( getPlayerMoney (source) >= 2000 ) then
takePlayerMoney(source, 2000)
local x,y,z = getElementPosition ( source )
local trolley1 = getElementInterior ( trolley )
trolley = createObject (2780, x, y, z, 0, 0, 0 )
outputChatBox(""..getPlayerName(source).." Bought SMoke !", getRootElement(), 0, 255, 0, true)
else
outputChatBox(" No Money !", source, 255, 0, 0, true)
end
end
)
This makes totally no sense... i suposed you learned more