hello guys, i was trying to make it save object when i reconnect can anyone help me?
[[ Client ]]
function finel ()
local item = guiGridListGetSelectedItem (myGirld)
ID = guiGridListGetItemText (myGirld, item,3)
body = guiGridListGetItemText (myGirld, item,4)
rot = guiGridListGetItemText (myGirld, item,5)
prices = guiGridListGetItemText (myGirld, item,2)
triggerServerEvent( "give",localPlayer,prices,ID,body,rot)
showCursor(false)
destroyElement(window)
end
addEventHandler("onClientGUIClick", buying, finel)
[[ Server ]]
local obj = {}
function maske_kaldir2(pay,id,bdy,rot)
local money = getPlayerMoney(client)
if (money > tonumber (pay)) then
takePlayerMoney (client,(pay))
obje[source] = createObject ( objeid, 0, 0, 0, 0, 0, 0 )
exports.bone_attach:attachElementToBone(obje[source],source,1,0,0,-0.61,0,0,90)
else
outputChatBox ("You dont have Money" ,client ,255,0,0)
end
end
addEvent("give",true)
addEventHandler("give", root, maske_kaldir2)