mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
elegant crash complete protection (#3109)
This commit is contained in:
parent
7195f5f069
commit
cc91ad4ea4
@ -186,6 +186,7 @@ namespace big
|
||||
|
||||
TSECommand = 800157557, // CnCTG_IN_BF
|
||||
TSECommandRotateCam = 225624744, // != 29) && f
|
||||
TSECommandSound = 385726943,
|
||||
|
||||
Notification = -642704387,
|
||||
NotificationMoneyBanked = 94410750, // TICK_TC_BANK
|
||||
|
@ -215,12 +215,28 @@ namespace big
|
||||
}
|
||||
break;
|
||||
case eRemoteEvent::TSECommand:
|
||||
if (g.protections.script_events.rotate_cam && static_cast<eRemoteEvent>(args[3]) == eRemoteEvent::TSECommandRotateCam && !NETWORK::NETWORK_IS_ACTIVITY_SESSION())
|
||||
{
|
||||
if (NETWORK::NETWORK_IS_ACTIVITY_SESSION())
|
||||
break;
|
||||
|
||||
if (g.protections.script_events.rotate_cam && static_cast<eRemoteEvent>(args[3]) == eRemoteEvent::TSECommandRotateCam)
|
||||
{
|
||||
g.reactions.rotate_cam.process(plyr);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (g.protections.script_events.sound_spam && static_cast<eRemoteEvent>(args[3]) == eRemoteEvent::TSECommandSound)
|
||||
{
|
||||
if (!plyr || plyr->m_play_sound_rate_limit_tse.process())
|
||||
{
|
||||
if (plyr->m_play_sound_rate_limit_tse.exceeded_last_process())
|
||||
g.reactions.sound_spam.process(plyr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case eRemoteEvent::SendToCayoPerico:
|
||||
if (g.protections.script_events.send_to_location && args[4] == 0)
|
||||
{
|
||||
|
@ -67,6 +67,7 @@ namespace big
|
||||
|
||||
rate_limiter m_host_migration_rate_limit{2s, 15};
|
||||
rate_limiter m_play_sound_rate_limit{1s, 10};
|
||||
rate_limiter m_play_sound_rate_limit_tse{5s, 2};
|
||||
rate_limiter m_invites_rate_limit{10s, 2};
|
||||
rate_limiter m_radio_request_rate_limit{5s, 2};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user