AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Simple question (https://forums.alliedmods.net/showthread.php?t=281869)

pupdebox 04-23-2016 05:43

Simple question
 
i want this function work for ct and also rcon flagged admins how to do it?
Code:

public Touch_Wall(entity, id)
{
        if(is_user_alive(id))
        {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_CT) {                                 
                if(g_flDelay[id] < get_gametime())
                {
                        new intCvarButton;
                        intCvarButton = get_pcvar_num(g_cvarButton);
                       
                        if(!intCvarButton || (intCvarButton && pev(id, pev_button) & IN_USE))
                        {
                                set_player_behindwall(id);
                        }
                }
                                            }
        }
}


Black Rose 04-23-2016 06:33

Re: Simple question
 
Code:
public Touch_Wall(entity, id) {     new intCvarButton = get_pcvar_num(g_cvarButton)     if ( is_user_alive(id)         && g_flDelay[id] < get_gametime()         && (             cs_get_user_team(id) == CS_TEAM_CT             || get_user_flags(id) & ADMIN_RCON         )         && (             ! intCvarButton             || pev(id, pev_button) & IN_USE         ) )         set_player_behindwall(id); }

pupdebox 04-23-2016 07:19

Re: Simple question
 
Thank you for help sir. This is very teaching


All times are GMT -4. The time now is 18:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.