Raised This Month: $32 Target: $400
 8% 

[Plugin] Password on server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VenomMix
Member
Join Date: Nov 2018
Old 02-07-2019 , 10:27   [Plugin] Password on server
Reply With Quote #1

Hello!
I would like a password plugin on the server.
I mean, put the password on the server and take it out.
Use the !pass command to parse the server, and through !nopass to get it out
When I put her password and get her password, she also appears in the chat :
[MIX] Admin% has set the password
[MIX] Admin% has removed the password
and on the tag, I can choose red, blue, gray
VenomMix is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-07-2019 , 10:34   Re: [Plugin] Password on server
Reply With Quote #2

Search. Something like that has already been made
DjSoftero is offline
VenomMix
Member
Join Date: Nov 2018
Old 02-07-2019 , 15:20   Re: [Plugin] Password on server
Reply With Quote #3

Yes, but it's different. I want it with chat messages
VenomMix is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-07-2019 , 15:51   Re: [Plugin] Password on server
Reply With Quote #4

So creating an entire plugin froms scratch is easier than editing that plugin and add the chat messages in it?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Barlap
Senior Member
Join Date: Apr 2016
Location: Romania
Old 02-07-2019 , 18:21   Re: [Plugin] Password on server
Reply With Quote #5

why not just user sv_password cvar?
Barlap is offline
Send a message via ICQ to Barlap Send a message via Skype™ to Barlap
VenomMix
Member
Join Date: Nov 2018
Old 02-07-2019 , 19:13   Re: [Plugin] Password on server
Reply With Quote #6

OciXCrom, if it was like you, did i do this?!

Last edited by VenomMix; 02-07-2019 at 19:13.
VenomMix is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-07-2019 , 19:44   Re: [Plugin] Password on server
Reply With Quote #7

It's no easier for admin to simply put in your config.cfg
bind "key" "amx_rcon sv_password "mix""

And another bind

bind "key" "amx_rcon sv_password """?
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-08-2019 , 03:55   Re: [Plugin] Password on server
Reply With Quote #8

Quote:
Originally Posted by VenomMix View Post
OciXCrom, if it was like you, did i do this?!
I don't understand what you just said. What I meant is upload the plugin you found and ask us to add the messages in it. It's much easier to do that instead of an entire plugin.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
VenomMix
Member
Join Date: Nov 2018
Old 02-09-2019 , 07:37   Re: [Plugin] Password on server
Reply With Quote #9

I apologize, I solved it personally. I appreciate your suggestions.
VenomMix is offline
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 02-19-2019 , 06:12   Re: [Plugin] Password on server
Reply With Quote #10

PHP Code:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN  "PasswordManager"
#define VERSION "1.0"
#define AUTHOR  "deprale"
#define TAGPLUGIN "[MIX]" // YOUR TAG
#pragma tabsize 0

new g_Tag[] = TAGPLUGIN
new bool:PassSet
new sv_password

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_pass""PassManager"ADMIN_KICK"Sets/Removes password (RANDOM).")

    
set_task(60.0"AutoPassRemove"___"b")

    
sv_password get_cvar_pointer"sv_password" )
}

public 
PassManager(idlevelcid)
{
    if(
is_user_admin(id) && ADMIN_KICK) {

        new 
l_AdminName[32]
        
get_user_name(idl_AdminName31)

        if (
PassSet == true){
            
set_cvar_string("sv_password""")
            
ColorChat(0GREEN"^4[^1%s^4]^1 Password^4 has been^1 removed from the server^4! [%s]"g_Tagl_AdminName)
            
PassSet false
        
}

        else if (
PassSet == false){
            new 
iPass random_num(2000,10000)
            
set_cvar_num("sv_password"iPass)
            for (new 
0maxplayers i++){
                if( 
is_user_admin(i) )
                    
ColorChat(idGREEN"^4[^1%s^4]^1 New server password is^4:^1 %i^4!"g_TagiPass)
                }
            
ColorChat(0GREEN"^4[^1%s^4]^1 A password has been^4 set^1 on server^4! [%s]"g_Tagl_AdminName)
            
PassSet true
        
}

    }
    
    return 
PLUGIN_HANDLED;
}
//AUTO REMOVE PASS
public AutoPassRemove(id)
{
    new 
curpass[32];
    
get_pcvar_stringsv_password curpass charsmaxcurpass ) )
    if( ( 
get_playersnum() == ) && ( ( curpass] != EOS) ) ) 
    {
        
set_cvar_string("sv_password""")
    }

    return 
PLUGIN_HANDLED;

SRC from my pug plugin. The formatting isn't like you specified but it shouldn't be an issue to modify to your likings. It should also check every 1 minute if there are no players the password will be automatically removed.

USAGE: amx_pass, if the current sv_password is null then it will set a password(random number from 2000 to 10000), amx_pass again and if sv_password IS NOT EMPTY it will remove the password. The server password will be shown to the admins!

EDIT: JUST SAW YOU FIXED IT, but leaving it nonetheless for future researchers who might stumble on this topic!
__________________

Last edited by deprale; 02-19-2019 at 06:19.
deprale is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:59.


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