How do I make an event? Redm CFX LUA

---------------------------------------------------
--- How do I make an event
---------------------------------------------------
---- example event 
RegisterNetEvent('new_event')
AddEventHandler('new_event', function() 
    -- do something code here.
end) 

By

Dragon Codes