Rewrite AC bypass (#2430)

* fix(anticheat): rewrite AC bypass again (the old one isn't detected but this is cleaner)
* fix(chat): some chat tweaks
* fix(anticheat): fix memory leak
* feat(lua): add is_player_friend
* fix(protections): fix possible false positives with the vehicle task mismatch protection
* feat(protections): add debug logs to trace false positive
* fix(spam): add some more stuff
This commit is contained in:
maybegreat48
2023-11-19 22:20:15 +00:00
committed by GitHub
parent 6ec0478414
commit a97af16888
17 changed files with 78 additions and 91 deletions

View File

@ -11,7 +11,15 @@ command.call_player(somePlayerIndex, "spawn", {joaat("adder")})
For a complete list of available command functions, please refer to the command table documentation.
## Command Count: 212
## Command Count: 213
### bailkick
BAIL_KICK_DESC
Arg Count: 1
### bailkickall
BAIL_KICK_DESC
Arg Count: 0
### breakup
BREAKUP_KICK_DESC
@ -53,10 +61,6 @@ Arg Count: 1
SCRIPT_HOST_KICK_DESC
Arg Count: 1
### multikick
MULTI_KICK_DESC
Arg Count: 1
### clearwanted
CLEAR_WANTED_LEVEL_DESC
Arg Count: 1

View File

@ -605,8 +605,8 @@ for table_name, table in tables.items():
file_name = f"./tables/{table_name}.md"
if os.path.exists(file_name):
os.remove(file_name)
f = open(file_name, "a")
f.write(str(table))
f = open(file_name, "ba")
f.write(bytes(str(table), "UTF8"))
f.close()
tabs_file_name = f"./tabs.md"
@ -675,8 +675,8 @@ for class_name, class_ in classes.items():
file_name = f"./classes/{class_name}.md"
if os.path.exists(file_name):
os.remove(file_name)
f = open(file_name, "a")
f.write(str(class_))
f = open(file_name, "ba")
f.write(bytes(str(class_), "UTF8"))
f.close()

View File

@ -2,7 +2,7 @@
Table containing helper functions for network related features.
## Functions (11)
## Functions (12)
### `trigger_script_event(bitset, _args)`
@ -106,6 +106,19 @@ network.flag_player_as_modder(player_idx, reason, custom_reason)
boolean = network.is_player_flagged_as_modder(player_idx)
```
### `is_player_friend(player_idx)`
- **Parameters:**
- `player_idx` (integer): Index of the player.
- **Returns:**
- `boolean`: Returns true if the given player is a friend.
**Example Usage:**
```lua
boolean = network.is_player_friend(player_idx)
```
### `get_flagged_modder_reason(player_idx)`
- **Parameters:**

View File

@ -13,7 +13,7 @@ end)
For a complete list of available gui functions, please refer to the tab class documentation and the gui table documentation.
## Tab Count: 44
## Tab Count: 47
### `GUI_TAB_SELF`
### `GUI_TAB_WEAPONS`
@ -22,6 +22,7 @@ For a complete list of available gui functions, please refer to the tab class do
### `GUI_TAB_MOBILE`
### `GUI_TAB_OUTFIT_EDITOR`
### `GUI_TAB_OUTFIT_SLOTS`
### `GUI_TAB_ANIMATIONS`
### `GUI_TAB_VEHICLE`
### `GUI_TAB_HANDLING`
### `GUI_TAB_HANDLING_SEARCH`
@ -39,6 +40,7 @@ For a complete list of available gui functions, please refer to the tab class do
### `GUI_TAB_BLACKHOLE`
### `GUI_TAB_MODEL_SWAPPER`
### `GUI_TAB_VFX`
### `GUI_TAB_XML_MAPS`
### `GUI_TAB_NETWORK`
### `GUI_TAB_MISSIONS`
### `GUI_TAB_SPOOFING`
@ -55,5 +57,6 @@ For a complete list of available gui functions, please refer to the tab class do
### `GUI_TAB_REACTION_SETTINGS`
### `GUI_TAB_PROTECTION_SETTINGS`
### `GUI_TAB_TRANSLATION_SETTINGS`
### `GUI_TAB_PROXY_SETTINGS`
### `GUI_TAB_DEBUG`
### `GUI_TAB_PLAYER`