mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-07-18 17:38:12 +08:00
[server] Implement/match CGangZonePool::ShowForPlayer(...)
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define RGBA_ABGR(n) (((n >> 24) & 0x000000FF) | ((n >> 8) & 0x0000FF00) | ((n << 8) & 0x00FF0000) | ((n << 24) & 0xFF000000))
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CGangZonePool::CGangZonePool()
|
||||
{
|
||||
for (WORD wZone = 0; wZone < MAX_GANG_ZONES; wZone++)
|
||||
@ -34,3 +38,16 @@ void CGangZonePool::Delete(WORD wZone)
|
||||
pNetGame->BroadcastData(RPC_ScrRemoveGangZone, &bsParams, INVALID_PLAYER_ID, 2);
|
||||
}
|
||||
|
||||
void CGangZonePool::ShowForPlayer(PLAYERID playerId, WORD wZone, DWORD dwColor)
|
||||
{
|
||||
RakNet::BitStream bsParams;
|
||||
bsParams.Write(wZone);
|
||||
bsParams.Write(m_fGangZone[wZone][0]);
|
||||
bsParams.Write(m_fGangZone[wZone][1]);
|
||||
bsParams.Write(m_fGangZone[wZone][2]);
|
||||
bsParams.Write(m_fGangZone[wZone][3]);
|
||||
dwColor = RGBA_ABGR(dwColor);
|
||||
bsParams.Write(dwColor);
|
||||
pNetGame->SendToPlayer(RPC_ScrAddGangZone, &bsParams, playerId, 2);
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ public:
|
||||
~CGangZonePool() {};
|
||||
WORD New(float fMinX, float fMinY, float fMaxX, float fMaxY);
|
||||
void Delete(WORD wZone);
|
||||
void ShowForPlayer(PLAYERID playerId, WORD wZone, DWORD dwColor);
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
||||
|
Reference in New Issue
Block a user