Check if player WAS alive when he join spectator team
how do we check if a player join spectator when he was still alive? currently this what i have but the chat message doesnt seem to be printed when i use is_user_alive
Code:
public plugin_init() |
Re: Check if player is alive when he join spectator team
Code:
set_task(0.5, "check_alive", id);Code:
public check_alive(id) |
Re: Check if player is alive when he join spectator team
are there other ways beside using set_tsk with repeative flag?
|
Re: Check if player is alive when he join spectator team
Something like this:
PHP Code:
PHP Code:
|
Re: Check if player is alive when he join spectator team
Quote:
Even if it doesn't matter if it is used in this case, you shouldn't name the function "ev_Respawn". That event is called more than just when a player spawns, and if a new scripter sees that, they will think it is the correct way to hook spawning. |
Re: Check if player is alive when he join spectator team
Fixed?
EDIT: Quote:
|
Re: Check if player is alive when he join spectator team
You could've used "ev_ResetHUD", but that's fine, too.
|
Re: Check if player is alive when he join spectator team
@Dores
thanks so much! @Exolent yea you are right about ResetHUD cause i've always thought this event is called only when players spawn. any idea why it's called resetHUD by the way? such a horrible name, people might have thought it's used when hud on screen are being reset. |
Re: Check if player is alive when he join spectator team
It is used when a player's HUD is reset.
The event is called when:
|
Re: Check if player is alive when he join spectator team
im starting to think that this isn't possible =\ when you join spec, you'll definately be killed so hooking DeathMsg event to check if player was still alive before he joins spectator is kinda pointless cause it will always return false there..
Code:
evade.log Code:
L 01/07/2009 - 01:21:29: Log file started (file "cstrike\addons\amxmodx\logs\evade.log") (game "cstrike") (amx "1.8.0.3660") |
| All times are GMT -4. The time now is 09:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.