feat: Block Stand elegant crash (#3076)
This commit is contained in:
parent
9062491f1d
commit
f44edb83a5
@ -5,14 +5,15 @@
|
||||
#include "hooking/hooking.hpp"
|
||||
#include "lua/lua_manager.hpp"
|
||||
#include "util/math.hpp"
|
||||
#include "util/session.hpp"
|
||||
#include "util/script_database.hpp"
|
||||
#include "util/session.hpp"
|
||||
|
||||
#include <network/CNetGamePlayer.hpp>
|
||||
#include <network/Network.hpp>
|
||||
#include <script/globals/GPBD_FM_3.hpp>
|
||||
#include <script/globals/GlobalPlayerBD.hpp>
|
||||
|
||||
|
||||
namespace big
|
||||
{
|
||||
static const script_protection_DB script_database;
|
||||
@ -129,6 +130,13 @@ namespace big
|
||||
g.reactions.crash.process(plyr);
|
||||
return true;
|
||||
}
|
||||
if (args[3] == -4640169 && args[7] == -36565476 && args[8] == -53105203)
|
||||
{
|
||||
session::add_infraction(plyr, Infraction::TRIED_CRASH_PLAYER);
|
||||
g.reactions.crash.process(plyr);
|
||||
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case eRemoteEvent::Notification:
|
||||
@ -384,9 +392,7 @@ namespace big
|
||||
|
||||
break;
|
||||
}
|
||||
case eRemoteEvent::DestroyPersonalVehicle:
|
||||
g.reactions.destroy_personal_vehicle.process(plyr);
|
||||
return true;
|
||||
case eRemoteEvent::DestroyPersonalVehicle: g.reactions.destroy_personal_vehicle.process(plyr); return true;
|
||||
case eRemoteEvent::KickFromInterior:
|
||||
if (scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[self::id].SimpleInteriorData.Owner != plyr->id())
|
||||
{
|
||||
@ -443,7 +449,6 @@ namespace big
|
||||
{
|
||||
g.reactions.start_script.only_notify(plyr);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -476,7 +481,8 @@ namespace big
|
||||
auto local_time = *std::localtime(&timer);
|
||||
|
||||
static std::ofstream log(g_file_manager.get_project_file("./script_events.log").get_path(), std::ios::app);
|
||||
log << "[" << std::put_time(&local_time, "%m/%d/%Y %I:%M:%S") << ":" << std::setfill('0') << std::setw(3) << ms.count() << " " << std::put_time(&local_time, "%p") << "] " << output.str() << std::endl;
|
||||
log << "[" << std::put_time(&local_time, "%m/%d/%Y %I:%M:%S") << ":" << std::setfill('0') << std::setw(3) << ms.count() << " " << std::put_time(&local_time, "%p") << "] "
|
||||
<< output.str() << std::endl;
|
||||
log.flush();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user