mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[bot] Implement WorldPlayerDeath(...)
This commit is contained in:
parent
a88d88bb26
commit
0902c67707
@ -201,10 +201,25 @@ void WorldPlayerAdd(RPCParameters *rpcParams)
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// Physical player is dead
|
||||
|
||||
void UnkA6(RPCParameters *rpcParams)
|
||||
void WorldPlayerDeath(RPCParameters *rpcParams)
|
||||
{
|
||||
// TODO: UnkA6
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
|
||||
PLAYERID playerId;
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
bsData.Read(playerId);
|
||||
|
||||
if(pNetGame->GetPlayerPool()->GetSlotState(playerId) == FALSE) return;
|
||||
|
||||
if(pNetGame->GetBotMode()) {
|
||||
pNetGame->GetBotMode()->OnPlayerDeath(playerId);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
@ -466,10 +481,10 @@ void RegisterRPCs(RakClientInterface * pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient,RequestClass);
|
||||
REGISTER_STATIC_RPC(pRakClient,RequestSpawn);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA6);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA3);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
@ -496,10 +511,10 @@ void UnRegisterRPCs(RakClientInterface * pRakClient)
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk1D);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk1E);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA6);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA3);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,ServerJoin);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,ServerQuit);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,InitGame);
|
||||
|
@ -36,11 +36,11 @@
|
||||
#define RPC_Unk1D "\x1D"
|
||||
#define RPC_Unk1E "\x1E"
|
||||
#define RPC_Unk3C "\x3C"
|
||||
#define RPC_UnkA6 "\xA6"
|
||||
#define RPC_UnkA3 "\xA3"
|
||||
#define RPC_UnkA4 "\xA4"
|
||||
#define RPC_UnkA5 "\xA5"
|
||||
#define RPC_WorldPlayerAdd "\x20"
|
||||
#define RPC_WorldPlayerDeath "\xA6"
|
||||
#define RPC_DamageVehicle "\x6A"
|
||||
#define RPC_Unk18 "\x18"
|
||||
#define RPC_EnterVehicle "\x1A"
|
||||
|
@ -25,11 +25,11 @@ void Weather(RPCParameters *rpcParams) {}
|
||||
void Unk1D(RPCParameters *rpcParams) {}
|
||||
void Unk1E(RPCParameters *rpcParams) {}
|
||||
void Unk3C(RPCParameters *rpcParams) {}
|
||||
void UnkA6(RPCParameters *rpcParams) {}
|
||||
void UnkA3(RPCParameters *rpcParams) {}
|
||||
void UnkA4(RPCParameters *rpcParams) {}
|
||||
void UnkA5(RPCParameters *rpcParams) {}
|
||||
void WorldPlayerAdd(RPCParameters *rpcParams) {}
|
||||
void WorldPlayerDeath(RPCParameters *rpcParams) {}
|
||||
void DamageVehicle(RPCParameters *rpcParams) {}
|
||||
void Unk18(RPCParameters *rpcParams) {}
|
||||
void EnterVehicle(RPCParameters *rpcParams) {}
|
||||
@ -76,11 +76,11 @@ void RegisterRPCs(RakClientInterface * pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk1D);
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk1E);
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk3C);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA6);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA3);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
REGISTER_STATIC_RPC(pRakClient,DamageVehicle);
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk18);
|
||||
REGISTER_STATIC_RPC(pRakClient,EnterVehicle);
|
||||
@ -106,11 +106,11 @@ void RegisterRPCs(RakClientInterface * pRakClient)
|
||||
void UnRegisterRPCs(RakClientInterface * pRakClient)
|
||||
{
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk3C);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA6);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA3);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk18);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,RequestClass);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,RequestSpawn);
|
||||
|
Loading…
Reference in New Issue
Block a user