[PAID][ESX] Event System

COMMAND CAN SEND ONLY BY CONSOLE [F8]

Commands :
/startevent (Starts Event)
/stopevent (Ends The Event)
/resetevent (If You Want Quickly Change Event Coords Or Bugged Restarts POS And Restart Event)

Preview → Here[YouTube]

Get It Here Tebex 1 euro

1 Like

Please enter an amount greater than 5 EUR that you’d like to pay.

Are you serious? For something as simple as that, you want at least € 5

1 Like

sorry i updated the price to 1

thanks

-gabriel

I say let the free market decide.

im sorry but a script as simple as this is shouldnt be paid at all. yes, the author had intentions with this but im my opinion its not worth it as it can be made for free in like 10 min.

Ok no problem but for 1 euro it worth i think

  • Few Lines. Releases with minimal code (such as only one script file that contains less than 50 lines) are considered too simple and is not allowed. We want users to release meaningful, configurable and complete scripts. Everyone starts somewhere, but not every little script you create needs to be shared.

:thinking:

its more than 50 lines

50 indents don’t count as 50 lines of code.

3 Likes

i bet he is using like that lua beautifer… where you have
CreateThread(
function()
while true do
end
end
)
end

no … :no_entry:

I disagree

local event = nil
RegisterCommand("startevent", function(source)
    local event = GetEntityCoords(GetPlayerPed(source))
end, true)

RegisterCommand("tpevent", function(source)
    SetEntityCoords(GetPlayerPed(source), event)
end, false)

Your entire resource can be done in 8 lines of code

Sorry but I remake your idea for free and standalone, there it is guys (not tested but should work :wink:):

By the way, try to add more features if you want to sell resources (€1, seriously?)

Apparently great minds think alike because after I saw this post a couple days ago, I wrote this out as I was ashamed to see someone trying to charge for this feature. But then I forgot to post it. It seems everyone is shocked at your attempt to charge for one of the most basic things I have seen for sale on here, so far.

So despite other options have been shared, here is mine. It is more lines than needed, to include the notifications that the preview video demonstrated. The video showed console print, chat messages AND native notifications… So I did them all as well, but seriously people, pick one, not all. Why notify locally if there is going to be a global chat message? Makes no sense! But it was in the video… So…

client.lua (Can be replaced with any notify function)

RegisterNetEvent("eventSystem:notify")
AddEventHandler("eventSystem:notify", function(msg)
    SetNotificationTextEntry("STRING")
    AddTextComponentSubstringPlayerName(msg)
    DrawNotification(false, true)
end)

server.lua (With notifications from video)

local event = nil

RegisterCommand("eventstart", function(source)
    if event ~= nil then
        TriggerClientEvent("eventSystem:notify", source, "~r~[Error]~s~ There's already an event in progress")
    else
        event = GetEntityCoords(GetPlayerPed(source))
        print("New Event: " .. event)
        TriggerClientEvent("eventSystem:notify", source, ("~g~[Success]~s~ Event Started at " .. event)
        TriggerClientEvent('chat:addMessage', -1, {    args = { "Event", "Event Started! Join with /eventtp" }, color = { 255, 0, 0 } })
    end
end, true)

RegisterCommand("eventstop", function(source)
    if event ~= nil then
        TriggerClientEvent("eventSystem:notify", source, "~r~[Error]~s~ There's no active event")
    else
        event = nil
        print("Event Stopped")
        TriggerClientEvent("eventSystem:notify", source, "~g~[Success]~s~ Event Stopped")
        TriggerClientEvent('chat:addMessage', -1, {    args = { "Event", "Event Ended! Thank You For Participating" }, color = { 255, 0, 0 } })
    end
end, true)

RegisterCommand("eventreset", function(source)
    if event ~= nil then
        print("Event Stopped")
    end
    event = GetEntityCoords(GetPlayerPed(source))
    print("New Event: " .. event)
    TriggerClientEvent("eventSystem:notify", source, "~g~[Success]~s~ Event Reset to " .. event)
    TriggerClientEvent('chat:addMessage', -1, {    args = { "Event", "Event Restarted! Join with /eventtp" }, color = { 255, 0, 0 } })
end, true)

RegisterCommand("eventtp", function(source)
    if event ~= nil then
        SetEntityCoords(GetPlayerPed(source), event)
    else
        TriggerClientEvent("eventSystem:notify", source, "~r~[Error]~s~ There's no active event")
    end
end, false)

EDIT: Oh and my solution is also standalone. There is NO reason for ESX to be a requirement. Maybe the OP just did that to use the ESX notification function because they couldn’t write their own?!? Weird!

Please send a copy to moderators group for approval of the quality of this paid resource