View Single Post
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-13-2016 , 09:02   Re: ghost ADMIN CVAR
Reply With Quote #5

Try this :

PHP Code:
public DeathMsg(){
    if(
endround)
        return;
    new 
i_dead read_data(2)    
    
    if(!
is_user_connected(i_dead) && !is_user_bot(i_dead))
        return;
        
    if(
get_pcvar_num(cvar_admin) != && !(get_user_flags(i_dead) & ADMIN_LEVEL_A))
        return;

    if(
is_user_alive(i_dead)){
        
client_print(i_dead,print_chat,"%L",i_dead,"USER_ALIVE");
        return;
    }
        
    if(
is_ghost[i_dead]){
        
client_print(i_dead,print_chat,"%L",i_dead,"USER_GHOST");
        return;
    }
    
    if(
endround){
        
client_print(i_dead,print_chat,"%L",i_dead,"ROUND_END");
        return;
    }
    
    if(
use_menu[i_dead])
        
set_task(0.1,"ghost_respawn",i_dead+TASK_RESPAWN);
    else
        
ghost_menu(i_dead);

remove public ghost(id) function and replace deathmsg function with the above one.

I updated the code.

Last edited by siriusmd99; 02-14-2016 at 11:31.
siriusmd99 is offline