AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ Help ] user banct (https://forums.alliedmods.net/showthread.php?t=308389)

Fuck For Fun 06-18-2018 15:08

[ Help ] user banct
 
EDIT: problem with native player still can transfer to CT
Quote:

native jb_is_user_banned();
Code:

        new NameSz[ 32 ], player;       
               
               
                case CT_TRANSFER:
                {
                        if ( !( get_user_flags( player ) & ADMIN_IMMUNITY ) || player == client )
                        {
                                if ( jb_is_user_banned( player ))
                                {
                                        ColorChat( player, "debug: Testing a player");
                                        return PLUGIN_HANDLED;
                                }
                               
                                fm_set_user_team( player, FM_TEAM_CT );
                                fm_DispatchSpawn( player );
                       
                                ColorChat( 0, "%s ^3%s^1 has used^4 Counter-Terrorist Transfer^1 command.", Gisha[AdminMyAccess[client]],NameSz)
                        }


^SmileY 06-18-2018 15:11

Re: [ Help ] Warning: Tag mismatch
 
Post complete code also the complete output from compiler

Fuck For Fun 06-18-2018 16:18

Re: [ Help ] user banct
 
bump

CrAzY MaN 06-19-2018 00:05

Re: [ Help ] user banct
 
Why don't you use cs_set_user_team?

maqi 06-19-2018 00:14

Re: [ Help ] user banct
 
Smiley asked you to post the whole code, whats the point of bumping without doing so?

Fuck For Fun 06-19-2018 04:43

Re: [ Help ] user banct
 
Quote:

Originally Posted by CrAzY MaN (Post 2597877)
Why don't you use cs_set_user_team?

Right, this is my old code that's just long and I do not have the power to change everything to cs_set_user_team

But one day I will.
Quote:

Originally Posted by maqi (Post 2597880)
Smiley asked you to post the whole code, whats the point of bumping without doing so?

There is no full code here is just example, I'm trying to ask how an option to block something that has a NATIVE ...

If you want to block someone from transferring to CT
This is my NATIVE: if (jb_is_user_banned (player))
And the player is still passing ... Maybe I should
if (! (jb_is_user_banned (player))

PHP Code:

    new NameSz32 ], player;    
        
        
        case 
CT_TRANSFER:
        {
            if ( !( 
get_user_flagsplayer ) & ADMIN_IMMUNITY ) || player == client )
            {
                if ( 
jb_is_user_bannedplayer ))
                {
                    
ColorChatplayer"debug: Testing a player");
                    return 
PLUGIN_HANDLED;
                }
                
                
fm_set_user_teamplayerFM_TEAM_CT );
                
fm_DispatchSpawnplayer );
            
                
ColorChat0"%s ^3%s^1 has used^4 Counter-Terrorist Transfer^1 command."Gisha[AdminMyAccess[client]],NameSz)
            } 


maqi 06-19-2018 04:45

Re: [ Help ] user banct
 
How should we possibly know what your native does if you don't send us the code. Im sorry but you are on your own.


All times are GMT -4. The time now is 12:17.

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