Raised This Month: $ Target: $400
 0% 

Register nick // LIKE users.ini


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ESTCOBS
Junior Member
Join Date: May 2008
Location: Kraków, Poland
Old 05-23-2008 , 08:21   Register nick // LIKE users.ini
Reply With Quote #1

Hi ;D
Who create plugin Register nick
Options :
amx_rn_ban XX // If another person have not their nick = ban XX minutes (0 = not perm. - just disable this option)
amx_rn_say 0 // Enable/Disable register nick in chat cmd (say /regnick MYNICK)

List of nicks read from configs/nicks.ini

Like this idea? Push me to better karma XD

Notes : Please use contain etc.
  • If you have register nick ESTCOBS, all nick begin ESTCOBS (example ESTCOBS with MP3 have reserved for you
    ==
  • If player X reserved nick Perfect Team # ESTCOBS all nicks begin Perfect Team # ESTCOBS its him

Very, very, very (...) very (...) veeery sorry for bad english

Regards
ESTCOBS
__________________
Róót ! xD
ESTCOBS is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 05-23-2008 , 08:29   Re: Register nick // LIKE users.ini
Reply With Quote #2

Yeah , I once thought about nick register too ...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
dekken
Veteran Member
Join Date: Jul 2007
Old 05-23-2008 , 08:31   Re: Register nick // LIKE users.ini
Reply With Quote #3

Quote:
Originally Posted by The_Thing View Post
Yeah , I once thought about nick register too ...
spam...

maybe this could help
http://forums.alliedmods.net/showthread.php?p=519376
__________________
Signature Goes Here
dekken is offline
ESTCOBS
Junior Member
Join Date: May 2008
Location: Kraków, Poland
Old 05-23-2008 , 08:40   Re: Register nick // LIKE users.ini
Reply With Quote #4

(...) with login (...)

I wanna to be any change nick / connecting = check nick {
if in_list [
if your = return
else = ban with XX minutes
]
else continue .....
}

+ set_task(180.0,checknick)

// Very lame code
// :]

Regards and thanks
__________________
Róót ! xD
ESTCOBS is offline
hazard1337
Senior Member
Join Date: Sep 2006
Old 05-23-2008 , 09:19   Re: Register nick // LIKE users.ini
Reply With Quote #5

the one dekken gave you is pretty much the same thing, but you want it to ban someone if you didn't put their name in the users.ini?
__________________
[IMG]http://img139.**************/img139/1530/2sejaewg1.gif[/IMG]
If you +/- my K, leave your name.
I do not take requests VIA PM
Click on this before requesting/suggesting
This is your best friend
hazard1337 is offline
Send a message via Skype™ to hazard1337
dekken
Veteran Member
Join Date: Jul 2007
Old 05-23-2008 , 10:01   Re: Register nick // LIKE users.ini
Reply With Quote #6

Quote:
Originally Posted by ESTCOBS View Post
(...) with login (...)

I wanna to be any change nick / connecting = check nick {
if in_list [
if your = return
else = ban with XX minutes
]
else continue .....
}

+ set_task(180.0,checknick)

// Very lame code
// :]

Regards and thanks

well i made something but its not quite done
its as far as i could go with it :X
and its probably crap O_O

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define MAX_NAMES    2000

new BanTime

new g_Count;
new 
g_NickNames[MAX_NAMES][35]
new 
bool:g_InFile[33]


public 
plugin_precache()
{
    new 
filename[200];
    
get_configsdir(filenamesizeof(filename) - 1);
    
add(filenamesizeof(filename) - 1"/nicks.ini");
    if(
file_exists(filename))
    {
        new 
file fopen(filename"rt");
        if(
file)
        {
            new 
data[128];
            new 
rest[sizeof(data) - sizeof(g_NickNames[])];
            while(!
feof(file) && (g_Count MAX_NAMES))
            {
                
fgets(filedatasizeof(data) - 1);
                if(
data[0] != ';')
                {
                    
parse(datag_NickNames[g_Count++], sizeof(g_NickNames[]) - 1restsizeof(rest) - 1);
                }
            }
            
fclose(file);
        }
    }
}

public 
plugin_init()
{
    
register_plugin("SteamID From File Test""0.1""dekken")
    
BanTime register_cvar("amx_nickban_time""1")
}

public 
client_authorized(id)
{
    if(
g_Count <= 0)
        return;
    
    
g_InFile[id] = false;
    
    new 
nickname[sizeof(g_NickNames[])]
    
get_user_name(idnicknamesizeof(nickname))
    for(new 
0g_Counti++)
    {
        if(
equali(nicknameg_NickNames[i]))
        {
            
g_InFile[id] = true;
            break;
        }
        
        else
        {
            
g_InFile[id] = false
        
}
    }
    
    
set_task(3.0"task_kick"id)
}


public 
client_disconnect(id)
{
    
g_InFile[id] = false
}

public 
task_kick(id)
{
    if(!
g_InFile[id])
    {
        new 
UserID
        UserID 
get_user_userid(id)
        
server_cmd("kick #%d"UserID)
    }
    return 
PLUGIN_HANDLED
}


public 
client_infochanged(id)
{
    new 
name[32], oldname[32]
    
get_user_info(id"name"name31)
    
get_user_name(idoldname31)
    
    if(
equal(nameoldname))
        return 
PLUGIN_HANDLED
    
    
else
    {
        new 
UserIDauthid[33], name2[33]
        
UserID get_user_userid(id)
        
get_user_authid(idauthid32)
        
        
get_user_name(idname232)
        
        
server_cmd("banid %i #%i;writeid;kick #%i",get_pcvar_num(BanTime),UserIDUserID)
    }
    return 
PLUGIN_HANDLED

create nicks.ini in amx Configs folder..
and add the Desired nicks...(i dont know how to create a command that will add this automatically)
on change-nick it checks if the Nick is in the list...if not it will ban him for the Time you set..(amx_nickban_time)


actually this is garbage, but good training for me
__________________
Signature Goes Here

Last edited by dekken; 05-23-2008 at 10:05.
dekken is offline
hazard1337
Senior Member
Join Date: Sep 2006
Old 05-23-2008 , 10:03   Re: Register nick // LIKE users.ini
Reply With Quote #7

lol why'd you include fun?
__________________
[IMG]http://img139.**************/img139/1530/2sejaewg1.gif[/IMG]
If you +/- my K, leave your name.
I do not take requests VIA PM
Click on this before requesting/suggesting
This is your best friend
hazard1337 is offline
Send a message via Skype™ to hazard1337
dekken
Veteran Member
Join Date: Jul 2007
Old 05-23-2008 , 10:05   Re: Register nick // LIKE users.ini
Reply With Quote #8

God knows..
i ripped it off my plugin..
and lots of the code there made by exolent
__________________
Signature Goes Here
dekken is offline
hazard1337
Senior Member
Join Date: Sep 2006
Old 05-23-2008 , 10:06   Re: Register nick // LIKE users.ini
Reply With Quote #9

haha well it just looked funny because you have <fun> a plugin void of fun functions. (pun / joke not intended)


BTW if you plan on cleaning that up, check if they're in the file before you set task to kick them, that way you save time and cpu for checking the task when its unnecessary
__________________
[IMG]http://img139.**************/img139/1530/2sejaewg1.gif[/IMG]
If you +/- my K, leave your name.
I do not take requests VIA PM
Click on this before requesting/suggesting
This is your best friend
hazard1337 is offline
Send a message via Skype™ to hazard1337
Reply



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 08:04.


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