AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Setting access flags for all players (https://forums.alliedmods.net/showthread.php?t=347050)

Vaflyan 03-30-2024 05:43

Setting access flags for all players
 
How can I make sure that all players have a different access flag when entering and not the standard one for ordinary players?

tedaimlocks 03-30-2024 08:05

Re: Setting access flags for all players
 
// Default access for all non admin players (see users.ini for access details)
//
// Default value: "z"
amx_default_access "z"

amxx.cfg

Natsheh 03-30-2024 09:18

Re: Setting access flags for all players
 
Quote:

Originally Posted by Vaflyan (Post 2820314)
How can I make sure that all players have a different access flag when entering and not the standard one for ordinary players?

Its called userid "get_user_userid"

Vaflyan 03-30-2024 09:52

Re: Setting access flags for all players
 
Quote:

Originally Posted by tedaimlocks (Post 2820320)
// Default access for all non admin players (see users.ini for access details)
//
// Default value: "z"
amx_default_access "z"

amxx.cfg

thx

Bugsy 03-30-2024 11:49

Re: Setting access flags for all players
 
Quote:

Originally Posted by Natsheh (Post 2820321)
Its called userid "get_user_userid"

You mean get_user_flags()?

fysiks 03-31-2024 04:21

Re: Setting access flags for all players
 
Quote:

Originally Posted by Natsheh (Post 2820321)
Its called userid "get_user_userid"

I don't think you understood the question.

Natsheh 03-31-2024 19:32

Re: Setting access flags for all players
 
Quote:

Originally Posted by fysiks (Post 2820386)
I don't think you understood the question.

I did understand the question he wants to give every player a unique flag which is not possible due to the limitations of flags, what he doesn't know about is userid, userid is unique for every player

Bugsy 03-31-2024 20:15

Re: Setting access flags for all players
 
Quote:

Originally Posted by Natsheh (Post 2820413)
I did understand the question he wants to give every player a unique flag which is not possible due to the limitations of flags, what he doesn't know about is userid, userid is unique for every player

I still don't think you understand his ask.

"How can I make sure that all players have a different access flag when entering and not the standard one for ordinary players?"

To me this reads as how do I give regular/non-admin players a different set of flags. Non-admin players by default get amx_default_access flags, and using set_user_flags(), he can apply whatever he wants to individual players.

This is interpreting his ask very literally.
PHP Code:

public client_authorizedid )
{
    new const 
szFlags[][] = 
    {
        
"abc",
        
"def",
        
"ghi",
        
"jkl"
    
};
    
    
//remove_user_flags( id , ... );
    
    
set_user_flagsid read_flagsszFlagsrandomsizeofszFlags ) ) ] ) );



fysiks 04-01-2024 01:46

Re: Setting access flags for all players
 
Quote:

Originally Posted by Natsheh (Post 2820413)
I did understand the question he wants to give every player a unique flag which is not possible due to the limitations of flags, what he doesn't know about is userid, userid is unique for every player

I don't think anyone knows for sure what the request is because it can be interpreted in different ways. The way you interpreted it is different from how I interpreted it and you didn't give any explanation of why your post made any sense. In your second post, you finally gave an explanation as to what you even meant.

The OP will need to better elaborate on what he or she actually wants.

Natsheh 04-01-2024 15:50

Re: Setting access flags for all players
 
I might misunderstood what the OP really wants, i thought he's interested in giving each player a unique accessflag upon entering the server and not just changing the default user flag, anyway i don't see how this question is related to scripting help, that is why its getting confusing...


All times are GMT -4. The time now is 00:45.

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