mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-09 02:43:38 +08:00
feat(ScriptEventHandler): Block known malicious script events (#219)
This commit is contained in:
parent
d3d231375c
commit
689c9bd216
@ -140,7 +140,13 @@ namespace big
|
|||||||
Spectate = -1113591308,
|
Spectate = -1113591308,
|
||||||
Teleport = 603406648,
|
Teleport = 603406648,
|
||||||
TransactionError = -1704141512,
|
TransactionError = -1704141512,
|
||||||
VehicleKick = 578856274
|
VehicleKick = 578856274,
|
||||||
|
Unknown1 = -145306724,
|
||||||
|
Unknown2 = -581037897,
|
||||||
|
Unknown3 = 1757755807,
|
||||||
|
Unknown4 = 436475575,
|
||||||
|
Unknown5 = 990606644,
|
||||||
|
Unknown6 = 69874647
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class eSessionType
|
enum class eSessionType
|
||||||
|
@ -130,6 +130,11 @@ namespace big
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case eRemoteEvent::RotateCam:
|
case eRemoteEvent::RotateCam:
|
||||||
|
if (g->protections.script_events.crash && args[2] == 537560473) {
|
||||||
|
format_string(player_name, "Crash - Rotate Cam", notify.crash.log, notify.crash.notify);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (g->protections.script_events.rotate_cam)
|
if (g->protections.script_events.rotate_cam)
|
||||||
{
|
{
|
||||||
if (CNetworkPlayerMgr* player_mgr = gta_util::get_network_player_mgr(); player_mgr != nullptr)
|
if (CNetworkPlayerMgr* player_mgr = gta_util::get_network_player_mgr(); player_mgr != nullptr)
|
||||||
@ -195,6 +200,36 @@ namespace big
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case eRemoteEvent::Unknown1:
|
||||||
|
if (g->protections.script_events.crash && args[2] >= 32) {
|
||||||
|
format_string(player_name, "Crash - #" + args[0], notify.crash.log, notify.crash.notify);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case eRemoteEvent::Unknown2:
|
||||||
|
if (g->protections.script_events.crash && (args[2] >= 62 || args[3] >= 32)) {
|
||||||
|
format_string(player_name, "Crash - #" + args[0], notify.crash.log, notify.crash.notify);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case eRemoteEvent::Unknown3:
|
||||||
|
if (g->protections.script_events.crash && args[2] >= 62) {
|
||||||
|
format_string(player_name, "Crash - #" + args[0], notify.crash.log, notify.crash.notify);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case eRemoteEvent::Unknown4:
|
||||||
|
case eRemoteEvent::Unknown5:
|
||||||
|
if (g->protections.script_events.crash && args[2] >= 20) {
|
||||||
|
format_string(player_name, "Crash - #" + args[0], notify.crash.log, notify.crash.notify);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case eRemoteEvent::Unknown6:
|
||||||
|
if (g->protections.script_events.crash) {
|
||||||
|
format_string(player_name, "Crash - #" + args[0], notify.crash.log, notify.crash.notify);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g->debug.script_event_logging)
|
if (g->debug.script_event_logging)
|
||||||
@ -211,4 +246,4 @@ namespace big
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user