AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] /tag /untag plugin (https://forums.alliedmods.net/showthread.php?t=154465)

zzzzzjames 04-09-2011 00:44

[REQ] /tag /untag plugin
 
Hey i no some 1 has made this plugin before

when a player types /tag in chat it puts a clan tag on the front of there name
e.g

before: shark
After: [eg] shark

Also a way to type /untag to take the tag off

Please some 1 make this plugin

Aykay 04-09-2011 03:10

Re: [REQ] /tag /untag plugin
 
If you know someone has made it before, why can't you use the search button?

zzzzzjames 04-09-2011 04:35

Re: [REQ] /tag /untag plugin
 
because its not public its a private plugin

Nyuszy 04-09-2011 05:33

Re: [REQ] /tag /untag plugin
 
PHP Code:

#include <amxmodx>

new bool:ptag[33]
new 
cvar_tag

public plugin_init()
{
    
register_clcmd("say /tag""add_tag")
    
register_clcmd("say /untag""remove_tag")
    
    
cvar_tag register_cvar("amx_tag""[tag]")
}

public 
client_connect(id)        // check if player has tag on connect
{
    new 
tag[32], name[65], temp[32]
    
get_pcvar_string(cvar_tagtag31)
    
get_user_name(idname64)
    
copy(tempstrlen(tag), name)
    if(
equali(temptag))
    {
        
ptag[id] = true
    
}
    else
    {
        
ptag[id] = false
    
}
}

public 
add_tag(id)
{
    if(!
ptag[id])
    {
        new 
tag[32], name[65], newname[65]
        
get_pcvar_string(cvar_tagtag31)
        
get_user_name(idname64)
        
format(newname64"%s %s"tagname)
        
set_user_info(id"name"newname)
        
ptag[id] = true
    
}
    return 
PLUGIN_HANDLED
}

public 
remove_tag(id)
{
    if(
ptag[id])
    {
        new 
tag[32], name[65]
        
get_pcvar_string(cvar_tagtag31)
        
get_user_name(idname64)
        if(
equali(name[strlen(tag)+1], " ")) // if there is a space between tag and name
        
{
            
format(tag64"%s "tag)
        }
        
replace(namestrlen(tag), tag"")
        
set_user_info(id"name"name)
        
ptag[id] = false
    
}
    return 
PLUGIN_HANDLED


try this :)

zzzzzjames 04-09-2011 22:42

Re: [REQ] /tag /untag plugin
 
thanks man works

hornet 04-10-2011 07:08

Re: [REQ] /tag /untag plugin
 
But too bad that bots can't type /tag ay james?

Aykay 04-10-2011 07:17

Re: [REQ] /tag /untag plugin
 
Quote:

Originally Posted by hornet (Post 1446973)
But too bad that bots can't type /tag ay james?

Oh my god. ROFL.

zzzzzjames 04-10-2011 22:43

Re: [REQ] /tag /untag plugin
 
? your point is?
these are not my servers ...
im just helping out a mate ... noob


All times are GMT -4. The time now is 10:19.

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