mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Implement/match n_GangZoneDestroy(...)
This commit is contained in:
parent
473e9a76e5
commit
5cd459179d
@ -22,6 +22,11 @@ public:
|
|||||||
void FlashForAll(WORD wZone, DWORD dwColor);
|
void FlashForAll(WORD wZone, DWORD dwColor);
|
||||||
void StopFlashForPlayer(PLAYERID playerId, WORD wZone);
|
void StopFlashForPlayer(PLAYERID playerId, WORD wZone);
|
||||||
void StopFlashForAll(WORD wZone);
|
void StopFlashForAll(WORD wZone);
|
||||||
|
BOOL GetSlotState(WORD wZone)
|
||||||
|
{
|
||||||
|
if (wZone >= MAX_GANG_ZONES) return FALSE;
|
||||||
|
return m_bSlotState[wZone];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
RakServerInterface * GetRakServer() { return m_pRak; };
|
RakServerInterface * GetRakServer() { return m_pRak; };
|
||||||
CGameMode * GetGameMode() { return m_pGameMode; };
|
CGameMode * GetGameMode() { return m_pGameMode; };
|
||||||
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
||||||
|
CGangZonePool * GetGangZonePool() { return m_pGangZonePool; };
|
||||||
CActorPool * GetActorPool() { return m_pActorPool; };
|
CActorPool * GetActorPool() { return m_pActorPool; };
|
||||||
|
|
||||||
void MasterServerAnnounce(float fElapsedTime);
|
void MasterServerAnnounce(float fElapsedTime);
|
||||||
|
@ -590,10 +590,13 @@ static cell AMX_NATIVE_CALL n_GangZoneCreate(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// native GangZoneDestroy(zone)
|
||||||
static cell AMX_NATIVE_CALL n_GangZoneDestroy(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GangZoneDestroy(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: GangZoneDestroy
|
CGangZonePool *pGangZonePool = pNetGame->GetGangZonePool();
|
||||||
return 0;
|
if (!pGangZonePool || !pGangZonePool->GetSlotState(params[1])) return 0;
|
||||||
|
pGangZonePool->Delete(params[1]);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL n_GangZoneShowForPlayer(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GangZoneShowForPlayer(AMX *amx, cell *params)
|
||||||
|
Loading…
Reference in New Issue
Block a user