AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need help for tag protect plugin! (https://forums.alliedmods.net/showthread.php?t=99451)

meigyoku 08-05-2009 15:22

I need help for tag protect plugin!
 
I have one plugin protect tag but have problem:
This plugin will protect change tag from user
But:
1. It's not bypass admin a - immunity
2. For example: One player with Dark Killer name come into server, his name change into [fifa] Dark Killer. The player change his name into Dark Killer but his name is auto change into [fifa] Dark, not into [fifa] Dark Killer (it only take one work of sentence). Please tell me fix it!
Please help me. Thank you so much!

============================================= ========
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", "[fifa] ")
}
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", name, 31)
    new clantag[24]
    get_pcvar_string(g_amx_clantag,clantag,23)
    if((!is_user_admin(id)) && (containi(name, clantag)>=0))
    {
        deletei(name, clantag)
        trim(name)
        if(strlen(name) == 0)
            copy(name, 7, "Player")
        set_user_info(id, "name", name)
    }
}
deletei(text[], const what[])
{
    new pos
    new len
    new i
    pos = containi(text, what)
    while (pos>=0)
    {
        len = strlen(what)
        i = 0
        while (text[pos+len+i]!=0)
        {
            text[pos+i] = text[pos+len+i]
            i++
        }
        text[pos+i] = 0
        pos = containi(text, what)
    }
}


meigyoku 08-07-2009 09:24

Re: I need help for tag protect plugin!
 
Nobody can help me, help me please!

vermillioN25 08-07-2009 09:55

Re: I need help for tag protect plugin!
 
Sry guy. I really don't know how to help you. But you could take a look at this script: AMX Exec 2 v0.3 by v3x. I think is almost the same system.

meigyoku 08-09-2009 15:14

Re: I need help for tag protect plugin!
 
Thank vermillioN25
That plugin does not relate my script!


All times are GMT -4. The time now is 18:26.

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