Client :
addEventHandler ( 'onClientGUIClick', root, function ()
if source == GUIEditor.button[3] then
triggerServerEvent ( 'nothing', localPlayer )
guiSetVisible ( GUIEditor.window[2], false )
showCursor ( false )
if getPlayerMoney ( localPlayer ) >= 2350 then
triggerServerEvent('nothing2', localPlayer )
else
outputChatBox('#ff0000You do not have enough money !',source,255,255,255, true)
end
end
end )
Server :
addEvent ( 'nothing2', true )
addEventHandler ( 'nothing2', root, function ( )
takePlayerMoney ( source, 2350 )
end )
يا ليت تنظم أكوادكـ