Skip to content

Event Hooks⚓︎

Recommended Event Hooks

If you are not sure about how to use these event hooks, make sure you check out the following guide, created by the 2Take1 Tester and Staff team.

Protections Guide

Event hooks allow 2Take1 to listen for specific Script or Network Events and treat them in different ways: logging them, displaying a notification, or right away blocking them.

Script Events⚓︎

Shared SE Protections

Our Discord server allows members to share their Script Event Protections.

Copy shared SEPs from the sharing channel and add them to the tele.cfg file (or replace the whole file).

More information below.

In 2Take1, Script Events are grouped in categories with a name that is relevant to the user, and you can see those categories in Online Tab → Event Hooks → Script Events.

When a certain category is hooked (enabled), any incoming Script Event that matches one of the events defined in the category will trigger the action assigned to the hook. For example, the Kick category contains many Script Events that are used to kick the player, and if you hook that category, receiving any of those events will trigger the action that you define in the hook.

2Take1 is able to hook these categories of Script Events by default:

  • Kick1
  • Invalid Apartment Invite
  • Vehicle Kick
  • CEO Kick
  • Apartment Invite

For each category, you can choose one of these actions:

  • Block – Reject the event.
  • Notify – Display a notification.
  • Karma – Reject the event and reply with a SE kick.
  • Block & Notify
  • Karma & Notify

Custom SE Protections⚓︎

%appdata%\PopstarDevs\2Take1Menu\cfg\sep.cfg

In order to add custom Script Event definitions for 2Take1 to use, append them at the end of the sep.cfg file (or replace the defaults on your own, if you know what you are doing).

Keep in mind that, if you make changes to sep.cfg while 2Take1 is running, you will have to reload it in the SEP Update submenu.

Managing script events

SEP Auto-updater

If you are not sure about how script events work, or just want to stop checking the Discord server for SEP updates, you can download a pre-made SEP file from 2Take1's servers. This SEP file will be actively updated by 2Take1 Staff and Tester teams in order to protect against new and common exploits.

The auto-updater is enabled by default. If you want to re-create the default (bundled) SEP file, disable the auto-update and then use the Reload SEP feature.

Network Events⚓︎

Do not hook random events!

Hooking the wrong events at the wrong time can potentially lead to all sorts of problems, from gameplay issues and softlocks, to sudden crashes.

While not as intuitive as Script Events, there are lots of Network Events that 2Take1 can protect you from. When a certain event is hooked (enabled), receiving that specific Network Event will trigger the action assigned to the hook.

For each event, you can choose between one of these actions:

  • Block – Reject the event.
  • Notify – Display a notification.
  • Block & Notify

Since hooking Net Events is likely to interfere with missions and heists, there is an option to quickly disable all hooks. You can use it as a "temporary shutdown switch", that will disable your net hooks without altering them.

Event Log⚓︎

2Take1 is able to write incoming Script or Network Events to the menu log. However, keep in mind that, if you leave these features enabled, your logfile will be flooded very quickly:

%appdata%\PopstarDevs\2Take1Menu\2Take1Menu.log

  1. Note that the first Kick events are only supposed to be used for notification. Don't set them to "block", as our main Kick Protection already blocks any type of kick based on Script Events.