11.01.2017, 19:06
Actually you can directly do this instead of a function "IsPlayerDead(playerid)":
The difference is when you check if health is less than 0.0 then the player is actually in death window, but if you just check if player state is PLAYER_STATE_WASTED, then the player can be in Death state or Class selection. So ya your headshot shouldn't work in class selection so just state check is enough.
PHP Code:
if (GetPlayerState(playerid) != PLAYER_STATE_WASTED)