Here's a nice snippet for people wishing to do a proper alive check for things like beacon/other commands. Personally I had the issue where a betting plugin was counting 'redie ghosts' in its odds calculation.
So to fix, add this to end of reddie.sp:
Code:
//Public function to check if client is a redie ghost
public bool:redieIsGhost(client) {
return g_bIsGhost[client];
}
Then to plugin of your choice, add:
HTML Code:
new Handle:g_RedieState;
And in
public OnPluginStart()
Code:
g_RedieState = CreateGlobalForward("redieIsGhost", ET_Single, Param_Cell);
Now to do a check if player is alive and not a redie ghost, simply do:
Code:
decl bool:isGhost;
Call_StartForward(g_RedieState);
Call_PushCell(client);
Call_Finish(_:isGhost);
//Ensure player is alive and is not a redie ghost
if (IsPlayerAlive(client) && !isGhost)
//Do stuff here
Also, using @alive tag seems to not target redie ghosts.
!beacon @alive works as intended.