PlayerRankings: Fix a slight error and oversight.
This commit is contained in:
parent
6eaf801871
commit
ec9d51c908
@ -602,8 +602,8 @@ public void OnClientSpawn(Event hEvent, const char[] sEvent, bool bDontBroadcast
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public Action OnClientSpawnPostCrown(Handle timer, int serial)
|
public Action OnClientSpawnPostCrown(Handle timer, int serial)
|
||||||
{
|
{
|
||||||
int client = -1;
|
int client;
|
||||||
if((client = GetClientFromSerial(serial)) == -1)
|
if((client = GetClientFromSerial(serial)) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
||||||
@ -617,8 +617,8 @@ public Action OnClientSpawnPostCrown(Handle timer, int serial)
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public Action OnClientSpawnPostSkull(Handle timer, int serial)
|
public Action OnClientSpawnPostSkull(Handle timer, int serial)
|
||||||
{
|
{
|
||||||
int client = -1;
|
int client;
|
||||||
if((client = GetClientFromSerial(serial)) == -1)
|
if((client = GetClientFromSerial(serial)) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
||||||
@ -736,7 +736,10 @@ public Action OnCrownUpdate(Handle timer, DataPack data)
|
|||||||
if ((client = EntRefToEntIndex(data.ReadCell())) == INVALID_ENT_REFERENCE)
|
if ((client = EntRefToEntIndex(data.ReadCell())) == INVALID_ENT_REFERENCE)
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
|
|
||||||
if (!IsValidEntity(entity) || !IsClientInGame(client) || !IsPlayerAlive(client))
|
if (!IsValidEntity(entity))
|
||||||
|
return Plugin_Stop;
|
||||||
|
|
||||||
|
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
||||||
{
|
{
|
||||||
AcceptEntityInput(entity, "Kill");
|
AcceptEntityInput(entity, "Kill");
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
@ -766,7 +769,10 @@ public Action OnSkullUpdate(Handle timer, DataPack data)
|
|||||||
if ((client = EntRefToEntIndex(data.ReadCell())) == INVALID_ENT_REFERENCE)
|
if ((client = EntRefToEntIndex(data.ReadCell())) == INVALID_ENT_REFERENCE)
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
|
|
||||||
if (!IsValidEntity(entity) || !IsClientInGame(client) || !IsPlayerAlive(client))
|
if (!IsValidEntity(entity))
|
||||||
|
return Plugin_Stop;
|
||||||
|
|
||||||
|
if (!IsClientInGame(client) || !IsPlayerAlive(client))
|
||||||
{
|
{
|
||||||
AcceptEntityInput(entity, "Kill");
|
AcceptEntityInput(entity, "Kill");
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
|
Loading…
Reference in New Issue
Block a user