Raised This Month: $51 Target: $400
 12% 

protect tag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Denmla
Member
Join Date: Jul 2007
Old 01-18-2008 , 14:25   protect tag
Reply With Quote #1

Hello,

can somebody make for me that the users without immunity flag can't have "BS | " tag in nick. I want that server automatically delete BS | from nick if normal user want to use it. Just admins with immunity flag.

Thanks
Denmla is offline
lucius
Senior Member
Join Date: Aug 2007
Location: Netherlands
Old 01-18-2008 , 14:41   Re: protect tag
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?p=160621
__________________
"Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in dark rooms, munching pills and listening to repetitive electronic music." Marcus Brigstock
lucius is offline
Send a message via MSN to lucius
Denmla
Member
Join Date: Jul 2007
Old 01-19-2008 , 14:44   Re: protect tag
Reply With Quote #3

u saw my post there? i already tested this plugin but i get error.


server automatically changing name ...
Denmla is offline
[kirk]./musick`
Senior Member
Join Date: Jun 2007
Location: Tampa, Florida
Old 01-19-2008 , 20:11   Re: protect tag
Reply With Quote #4

You must be an administrator to keep the tag. Make sure that you are. I'm assuming that you are because you were able to add the plugin to the server. I'll take a look at the plugin to see what's up.

You must make sure that you do have ADMIN_IMMUNITY.

Last edited by [kirk]./musick`; 01-19-2008 at 20:18.
[kirk]./musick` is offline
Send a message via AIM to [kirk]./musick`
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-19-2008 , 21:00   Re: protect tag
Reply With Quote #5

Or the config of the person is set to read only.. (not sure)
__________________
hugz` is offline
Send a message via AIM to hugz`
Denmla
Member
Join Date: Jul 2007
Old 01-20-2008 , 01:24   Re: protect tag
Reply With Quote #6

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

new g_amx_tagprotect
new g_amx_clantag

public plugin_init()
{
    
register_plugin("BS Clan Tag""1""pizzahut")
    
g_amx_tagprotect register_cvar("amx_tagprotect""1")
    
g_amx_clantag register_cvar("amx_clantag""BS |")
}

public 
client_putinserver(id)
{
    
force_tag(id)
    return 
PLUGIN_CONTINUE
}

public 
client_infochanged(id)
{
    
force_tag(id)
    return 
PLUGIN_CONTINUE
}

force_tag(id)
{
    if(
get_pcvar_num(g_amx_tagprotect) == 0)
        return
    new 
name[32]
    
get_user_info(id"name"name31)
    new 
clantag[24]
    
get_pcvar_string(g_amx_clantag,clantag,23)
    if((!
is_user_admin(id)) && (containi(nameclantag)>=0))
    {
        
deletei(nameclantag)
        
trim(name)
        if(
strlen(name) == 0)
            
copy(name7"Player")
        
set_user_info(id"name"name)
    }
}

deletei(text[], const what[])
{
    new 
pos
    
new len
    
new i
    pos 
containi(textwhat)
    while (
pos>=0
    {
        
len strlen(what)
        
0
        
while (text[pos+len+i]!=0
        {
            
text[pos+i] = text[pos+len+i]
            
i++
        }
        
text[pos+i] = 0
        pos 
containi(textwhat)
    }

This plugin pizzahut made for me and it's works perfectlly, but admins can't enter with reserved slot, i have 1reserved slot on server, and when is 23/24 players then admins get message that they are droped due to slot reservation. When i pause this plugin they can enter with reserved slot. Maybe someone can to fix this code? thanks
Denmla is offline
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 04:08.


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