mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement/match ScrSetPlayerDrunkHandling(...)
This commit is contained in:
parent
40e3ac46c4
commit
694b02e99a
@ -120,8 +120,8 @@
|
||||
#define RPC_ScrUnk5B "\x5B"
|
||||
#define RPC_ScrUnk6F "\x6F"
|
||||
#define RPC_ScrUnk62 "\x62"
|
||||
#define RPC_ScrUnk96 "\x96"
|
||||
#define RPC_ScrSetPlayerDrunkVisuals "\x5C"
|
||||
#define RPC_ScrSetPlayerDrunkHandling "\x96"
|
||||
#define RPC_ScrUnk70 "\x70"
|
||||
#define RPC_ScrSetSpawnInfo "\x44"
|
||||
#define RPC_ScrUnk45 "\x45"
|
||||
|
@ -110,6 +110,7 @@ const SCRIPT_COMMAND set_panel_row_enable = { 0x08D9, "iii" };
|
||||
const SCRIPT_COMMAND get_panel_active_row = { 0x08D7, "iv" };
|
||||
|
||||
const SCRIPT_COMMAND set_player_drunk_visuals = { 0x052c, "ii" }; // player, severity (0-255)
|
||||
const SCRIPT_COMMAND handling_responsiveness = { 0x03fd, "ii" }; // player, severity (0-255)
|
||||
|
||||
// ---
|
||||
|
||||
|
@ -52,7 +52,6 @@ void ScrUnk5A(RPCParameters *rpcParams) {}
|
||||
void ScrUnk5B(RPCParameters *rpcParams) {}
|
||||
void ScrUnk6F(RPCParameters *rpcParams) {}
|
||||
void ScrUnk62(RPCParameters *rpcParams) {}
|
||||
void ScrUnk96(RPCParameters *rpcParams) {}
|
||||
void ScrUnk70(RPCParameters *rpcParams) {}
|
||||
void ScrSetSpawnInfo(RPCParameters *rpcParams) {}
|
||||
void ScrUnk45(RPCParameters *rpcParams) {}
|
||||
@ -244,6 +243,23 @@ void ScrSetPlayerDrunkVisuals(RPCParameters* rpcParams)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void ScrSetPlayerDrunkHandling(RPCParameters* rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
|
||||
int iVisuals;
|
||||
bsData.Read(iVisuals);
|
||||
|
||||
CPlayerPed* pPlayer = pGame->FindPlayerPed();
|
||||
if (pPlayer) {
|
||||
ScriptCommand(&handling_responsiveness, 0, iVisuals);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void RegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
{
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnkA7);
|
||||
@ -287,8 +303,8 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk5B);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk6F);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk62);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk96);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerDrunkVisuals);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerDrunkHandling);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk70);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrSetSpawnInfo);
|
||||
REGISTER_STATIC_RPC(pRakClient, ScrUnk45);
|
||||
@ -367,8 +383,8 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk5B);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk6F);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk62);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk96);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerDrunkVisuals);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerDrunkHandling);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk70);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk38);
|
||||
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk90);
|
||||
|
Loading…
Reference in New Issue
Block a user