Quote:
Originally Posted by Napoleon_be
I'm not very experienced with this kind of stuff, but what if you just place that check inside this check
PHP Code:
if(g_isalive[id] && is_player_stuck(id) && get_pcvar_num(cvar_autounstuck))
and check if it's NOT pressed instead of it is pressed. That way you don't even need to use the return.
i think it should look something like this, i might be wrong though.
PHP Code:
if(g_isalive[id] && is_player_stuck(id) && get_pcvar_num(cvar_autounstuck) && (button &~ IN_USE))
or this
PHP Code:
if(g_isalive[id] && is_player_stuck(id) && get_pcvar_num(cvar_autounstuck) && !(button & IN_USE))
|
Thank you for reply.
I test it, and something is change.
It won't spawn (unstuck) me now! instead it will spawn (unstuck) the other player while I'm inside it and holding the key E.
P.S
I think the problem is that the task is created also for other player and it will check if is blocked! but as I'm stay through him while i press E the task it detects the key E is hold only for me! so other will think is STUCK!
Code:
public client_putinserver(id)
{
if(!is_user_bot(id)) {
set_task(get_pcvar_float(cvar_autounstuck_time), "Auto_Unstuck", id+TASK_AUTO_UNSTUCK, _, _, "b") // Auto UnStuck Player
}
}
Anyone have a solution?
Thank you