Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Admin Tag Plugininde Hata Var
#1
Merhaba Arkadaşlar Ben Admin Tag Pluginini Kullanıyorum.Bu Pluginde Hata Var.Hatası ; Bir Oyuncu Servere Girdiğinde Yanında Slot Yazıyor.Konuşmaya Bişey Yazıncada Yeşil Yazıyor.O Sorunu Giderebilirmisiniz Acaba? Şimdiden Teşekkürler Cevabınızı Bekliyorum...

SMA ;


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

#define PLUGIN             "Admin Yesil Yazi & Adminlerde Tag"
#define VERSION         "2.2"
#define AUTHOR             "EDITLEYEN: Optimist"

#define ACCESS_LEVEL    ADMIN_IMMUNITY
#define ADMIN_LISTEN    ADMIN_LEVEL_C

new message[192]
new 
sayText
new teamInfo
new maxPlayers

new g_MessageColor
new g_NameColor
new g_AdminListen

new strName[191]
new 
strText[191]
new 
alive[11]

new const 
g_szTag[][] = {
    
"[Server Sahibi]",
    
"[Admin]",
    
"[Slot]"
}

new const 
g_iTagFlag[sizeof(g_szTag)] = {
    
ADMIN_RCON,
    
ADMIN_RCON,
    
ADMIN_BAN,
    
ADMIN_RESERVATION
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
g_MessageColor register_cvar("amx_color""2"
    
g_NameColor register_cvar("amx_namecolor""6"
    
g_AdminListen register_cvar("amx_listen""1")


    
sayText get_user_msgid("SayText")
    
teamInfo get_user_msgid("TeamInfo")
    
maxPlayers get_maxplayers()


    
register_message(sayText"avoid_duplicated")

    
register_concmd("amx_color""set_color"ACCESS_LEVEL"<color>")
    
register_concmd("amx_namecolor""set_name_color"ACCESS_LEVEL"<color>")
    
register_concmd("amx_listen""set_listen"ACCESS_LEVEL"<1 | 0>")
    
register_clcmd("say""hook_say")
    
register_clcmd("say_team""hook_teamsay")
}


public 
avoid_duplicated(msgIdmsgDestreceiver)
{
    return 
PLUGIN_HANDLED
}

get_tag_index(id)
{
    new 
flags get_user_flags(id)
    
    for(new 
1sizeof(g_iTagFlag); i++)
    {
        if(
check_admin_flag(flagsg_iTagFlag[i]))
        {
            return 
i
        
}
    }
    
    return 
0
}

check_admin_flag(flagsflag)
{
    if(
flag == ADMIN_ADMIN)
    {
        return ((
flags & ~ADMIN_USER) > 0)
    }
    else if(
flag == ADMIN_ALL)
    {
        return 
1
    
}
    
    return (
flags flag)
}

public 
hook_say(id)
{
    
read_args(message191)
    
remove_quotes(message)

    
    if(
message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message"")) 
        return 
PLUGIN_CONTINUE

    
new name[32]
    
get_user_name(idname31)

    new 
admin get_tag_index(id)

    new 
isAlive

    
if(is_user_alive(id))
    {
        
isAlive 1
        alive 
"^x01"
    
}
    else
    {
        
isAlive 0
        alive 
"^x01*DEAD* "
    
}

    static 
color[10]

    if(
admin)
    {
        
// İsim
        
switch(get_pcvar_num(g_NameColor))
        {
            case 
1:
                
format(strName191"^x04%s %s%s"g_szTag[admin], alivename)
            case 
2:
                
format(strName191"^x04%s %s^x04%s "g_szTag[admin], alivename)
            case 
3:
            {
                
color "SPECTATOR"
                
format(strName191"^x04%s %s^x03%s "g_szTag[admin], alivename)
            }
            case 
4:
            {
                
color "CT"
                
format(strName191"^x04%s %s^x03%s"g_szTag[admin], alivename)
            }
            case 
5:
            {
                
color "TERRORIST"
                
format(strName191"^x04%s %s^x03%s"g_szTag[admin], alivename)
            }
            case 
6:
            {
                
get_user_team(idcolor9)
                
format(strName191"^x04%s %s^x03%s"g_szTag[admin], alivename)
            }
        }

        
// Mesaj
        
switch(get_pcvar_num(g_MessageColor))
        {
            case 
1:    // Sari
                
format(strText191"%s"message)
            case 
2:    // Yesil
                
format(strText191"^x04%s"message)
            case 
3:    // Beyaz
            
{
                
copy(color9"SPECTATOR")
                
format(strText191"^x03%s"message)
            }
            case 
4:    // Mavi
            
{
                
copy(color9"CT")
                
format(strText191"^x03%s"message)
            }
            case 
5:    // Kirmizi
            
{
                
copy(color9"TERRORIST")
                
format(strText191"^x03%s"message)
            }
        }
    }
    else     
    {
        
get_user_team(idcolor9)
        
format(strName191"%s^x03%s"alivename)
        
format(strText191"%s"message)
    }

    
format(message191"%s^x01 :  %s"strNamestrText)

    
sendMessage(colorisAlive)    

    return 
PLUGIN_CONTINUE
}


public 
hook_teamsay(id)
{
    new 
playerTeam get_user_team(id)
    new 
playerTeamName[19]

    switch(
playerTeam
    {
        case 
1:
            
copy(playerTeamName11"Terrorists")

        case 
2:
            
copy(playerTeamName18"Counter-Terrorists")

        default:
            
copy(playerTeamName9"Spectator")
    }

    
read_args(message191)
    
remove_quotes(message)

   
    if(
message[0] == '@' || message[0] == '/' || message[0] == '!' || equal(message"")) 
        return 
PLUGIN_CONTINUE

    
new name[32]
    
get_user_name(idname31)

    new 
admin get_tag_index(id)

    new 
isAlive

    
if(is_user_alive(id))
    {
        
isAlive 1
        alive 
"^x01"
    
}
    else
    {
        
isAlive 0
        alive 
"^x01*DEAD* "
    
}

    static 
color[10]

    if(
admin)
    {
        
// İsim
        
switch(get_pcvar_num(g_NameColor))
        {
            case 
1:
                
format(strName191"%s(%s)^x04%s %s"aliveplayerTeamNameg_szTag[admin], name)
            case 
2:
                
format(strName191"%s(%s)^x04%s ^x04%s"aliveplayerTeamNameg_szTag[admin], name)
            case 
3:
            {
                
color "SPECTATOR"
                
format(strName191"%s(%s)^x04%s ^x03%s"aliveplayerTeamNameg_szTag[admin], name)
            }
            case 
4:
            {
                
color "CT"
                
format(strName191"%s(%s)^x04%s ^x03%s"aliveplayerTeamNameg_szTag[admin], name)
            }
            case 
5:
            {
                
color "TERRORIST"
                
format(strName191"%s(%s)^x04%s ^x03%s"aliveplayerTeamNameg_szTag[admin], name)
            }
            case 
6:
            {
                
get_user_team(idcolor9)
                
format(strName191"%s(%s)^x04%s ^x03%s"aliveplayerTeamNameg_szTag[admin], name)
            }
        }

        
// Message
        
switch(get_pcvar_num(g_MessageColor))
        {
            case 
1:    // Sari
                
format(strText191"%s"message)
            case 
2:    // Yesil
                
format(strText191"^x04%s"message)
            case 
3:    // Beyaz
            
{
                
copy(color9"SPECTATOR")
                
format(strText191"^x03%s"message)
            }
            case 
4:    // Mavi
            
{
                
copy(color9"CT")
                
format(strText191"^x03%s"message)
            }
            case 
5:    // Kirmizi
            
{
                
copy(color9"TERRORIST")
                
format(strText191"^x03%s"message)
            }
        }
    }
    else     
    {
        
get_user_team(idcolor9)
        
format(strName191"%s(%s) ^x03%s"aliveplayerTeamNamename)
        
format(strText191"%s"message)
    }

    
format(message191"%s ^x01:  %s"strNamestrText)

    
sendTeamMessage(colorisAliveplayerTeam)    

    return 
PLUGIN_CONTINUE
}


public 
set_color(idlevelcid)
{
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new arg[1], newColor
    read_argv
(1arg1)

    
newColor str_to_num(arg)

    if(
newColor >= && newColor <= 5)
    {
        
set_pcvar_num(g_MessageColornewColor)

        if(
get_pcvar_num(g_NameColor) != &&
            ((
newColor == &&  get_pcvar_num(g_NameColor) != 3)
            ||(
newColor == &&  get_pcvar_num(g_NameColor) != 4)
            ||(
newColor == &&  get_pcvar_num(g_NameColor) != 5)))
        {
            
set_pcvar_num(g_NameColor2)
        }
    }

    return 
PLUGIN_HANDLED
}


public 
set_name_color(idlevelcid)
{
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new arg[1], newColor
    read_argv
(1arg1)

    
newColor str_to_num(arg)

    if(
newColor >= && newColor <= 6)
    {
        
set_pcvar_num(g_NameColornewColor)

        if((
get_pcvar_num(g_MessageColor) != 1
            
&&((newColor == &&  get_pcvar_num(g_MessageColor) != 3)
            ||(
newColor == &&  get_pcvar_num(g_MessageColor) != 4)
            ||(
newColor == &&  get_pcvar_num(g_MessageColor) != 5)))
            || 
get_pcvar_num(g_NameColor) == 6)
        {
            
set_pcvar_num(g_MessageColor2)
        }
    }

    return 
PLUGIN_HANDLED
}


public 
set_listen(idlevelcid)
{
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new arg[1], newListen
    read_argv
(1arg1)

    
newListen str_to_num(arg)

    
set_pcvar_num(g_AdminListennewListen)

    return 
PLUGIN_HANDLED
}


public 
sendMessage(color[], alive)
{
    new 
teamName[10]

    for(new 
player 1player maxPlayersplayer++)
    {
        if(!
is_user_connected(player))
            continue

        if(
alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
        {
            
get_user_team(playerteamName9)
            
changeTeamInfo(playercolor)
            
writeMessage(playermessage)
            
changeTeamInfo(playerteamName)
        }
    }
}


public 
sendTeamMessage(color[], aliveplayerTeam)
{
    new 
teamName[10]

    for(new 
player 1player maxPlayersplayer++)
    {
        if(!
is_user_connected(player))
            continue

        if(
get_user_team(player) == playerTeam || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
        {
            if(
alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
            {
                
get_user_team(playerteamName9)
                
changeTeamInfo(playercolor)
                
writeMessage(playermessage)
                
changeTeamInfo(playerteamName)
            }
        }
    }
}


public 
changeTeamInfo(playerteam[])
{
    
message_begin(MSG_ONEteamInfo_player
    
write_byte(player)                
    
write_string(team)                
    
message_end()                   
}


public 
writeMessage(playermessage[])
{
    
message_begin(MSG_ONEsayText, {000}, player)    
    
write_byte(player)                   
    
write_string(message)                    
    
message_end()                        

[/i]
Coder İmza
PHP Code:
İletişim => cebinihat@hotmail.com 

Model İmza
PHP Code:
İletişim => cebinihat@hotmail.com 

CSP Signatür
PHP Code:
İletişim => cebinihat@hotmail.com 


En İyi Konularım:
Leqend Shop | Furkan Dize Shop |

Reply
#2
Her oyuncuda mı slot yazıyor ? Ayrıca ben bu plugini önermiyorum.

admin prefixes plugini daha iyi;

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

#define FLAG_LOAD ADMIN_CFG
#define MAX_FLAGS 33

new g_listeng_custom_currentg_custom_others;
new 
prefix_count 0prefix_collect[MAX_FLAGS][33], flag_listen[2], flag_custom_current[2], flag_custom_others[2], flags_collect[MAX_FLAGS][2], client_prefix[33][33];
new 
g_saytxtg_maxplayersg_nvault;
new 
g_typed[192], g_message[192], g_name[32], typed_prefix[33];

public 
plugin_init()
{
    
register_plugin("Admin Prefixes""1.0""m0skVi4a ;]")
    
    
g_listen register_cvar("ap_listen""0")
    
g_custom_current register_cvar("ap_custom_current""1")
    
g_custom_others register_cvar("ap_custom_others""1")
    
    
g_saytxt get_user_msgid ("SayText")
    
g_maxplayers get_maxplayers()
    
g_nvault nvault_open("CustomAdminPrefixes")
    
    
register_message(g_saytxt"DuplicateMessage")
    
register_concmd("ap_reloadfile""LoadFile")
    
register_concmd("ap_put""SetPrefix")
    
register_concmd("ap_put_player""SetPlayerPrefix")
    
register_clcmd("say""HookSay")
    
register_clcmd("say_team""HookSayTeam")
    
    
LoadFile(0)
}

public 
LoadFile(id)
{
    if(!(
get_user_flags(id) & FLAG_LOAD))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
config_dir[64], file[128], text[64], prefix[32], flags[2], lengthline 0;
    
prefix_count 0
    get_configsdir
(config_dircharsmax(config_dir))
    
formatex(filecharsmax(file), "%s/admin_prefixes.ini"config_dir)
    
    if(!
file_exists(file)) 
    {
        new 
error[256]
        
formatex(errorcharsmax(error), "[AdminPrefixes] Admin Prefix file - %s not found!"file)
        
set_fail_state(error)
    }
    
    while(
read_file(fileline textcharsmax(text), length) && prefix_count <= MAX_FLAGS)
    {
        if(!
text[0] || text[0] == '^n' || text[0] == ';')
        {
            
line++
            continue
        }
        
        
parse(textprefixcharsmax(prefix), flagscharsmax(flags))
        
        if(!
prefix[0] || !flags[0])
        {
            
line++
            continue
        }
        
        if(
equal(prefix"ADMIN_LISTEN"))
        {
            
flag_listen flags
            line
++
            continue
        }
        
        if(
equal(prefix"CUSTOM_CURRENT"))
        {
            
flag_custom_current flags
            line
++
            continue
        }
        
        if(
equal(prefix"CUSTOM_OTHERS"))
        {
            
flag_custom_others flags
            line
++
            continue
        }
        
        
replace_all(prefixcharsmax(prefix), "!g""^x04")
        
replace_all(prefixcharsmax(prefix), "!t""^x03")
        
replace_all(prefixcharsmax(prefix), "!n""^x01")
        
        
prefix_count++
        
prefix_collect[prefix_count] = prefix
        flags_collect
[prefix_count] = flags
        line
++
    }
    
    if(
flag_listen[0])
    {
        
server_print("[AdminPrefixes] LOADED: Listen Option for players with Flag:  %s"flag_listen)
    }
    if(
flag_custom_current[0])
    {
        
server_print("[AdminPrefixes] LOADED: Custom Prefix Option for players with Flag:  %s",  flag_custom_current)
    }
    if(
flag_custom_others[0])
    {
        
server_print("[AdminPrefixes] LOADED: Setting Custom Prefix Option for players with Flag:  %s"flag_custom_others)
    }
    if(
prefix_count 0)
    {
        for(new 
1<= prefix_counti++)
        {
            
server_print("[AdminPrefixes] LOADED: Prefix: %s for players with Flag:  %s"prefix_collect[i], flags_collect)
        }
    }
    else 
    {
        
server_print("[AdminPrefixes] No Prefixes were been found!")
    }
    
    
get_user_name(idg_namecharsmax(g_name))
    
server_print("[AdminPrefixes] Plugin's file was been loaded by %s"g_name)
    
console_print(id"[AdminPrefixes] Plugin's file was been loaded!")
    
    for(new 
1<= g_maxplayersi++)
    {
        
PutClientPrefix(i)
    }
    
    return 
PLUGIN_HANDLED
}

public 
client_connect(id)
{
    
client_prefix[id] = ""
    
set_task(1.0"PutClientPrefix"id)
}

public 
client_disconnect(id)
{
    
client_prefix[id] = ""
}

public 
PutClientPrefix(id)
{
    new 
nvault_prefix[33];
    
get_user_name(idg_namecharsmax(g_name))
    
    new 
data nvault_get(g_nvaultg_namenvault_prefixcharsmax(nvault_prefix))
    
    if(
data && get_pcvar_num(g_custom_current) && flag_custom_current[0] && get_user_flags(id) & read_flags(flag_custom_current))
    {
        
client_prefix[id] = nvault_prefix
    
}
    else
    {
        for(new 
1<= prefix_counti++)
        {
            if(
get_user_flags(id) & read_flags(flags_collect))
            {
                
client_prefix[id] = prefix_collect
            
}
        }
    }
}

public 
DuplicateMessage(id)

    return 
PLUGIN_HANDLED
}

public 
HookSay(id)
{
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)
    
    if(
equal(g_typed""))
        return 
PLUGIN_CONTINUE
    
    get_user_name
(idg_namecharsmax(g_name))
    
    if(
client_prefix[id][0])
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^4%s^3 %s :^4 %s"client_prefix[id], g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD*^4 %s^3 %s :^4 %s"client_prefix[id], g_nameg_typed)
        }
    }
    else
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^3%s :^1 %s"g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD*^3 %s :^1 %s"g_nameg_typed)
        }
    }
    
    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
        {
            
message_begin(MSG_ONEg_saytxt, {000}, i)
            
write_byte(id)
            
write_string(g_message)
            
message_end()
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
HookSayTeam(id
{
    new 
g_team[18];
    
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)
    
    if(
equal(g_typed""))
        return 
PLUGIN_CONTINUE
    
    get_user_name
(idg_namecharsmax(g_name))
    
    switch(
cs_get_user_team(id)) {
        case 
CS_TEAM_T:    g_team "Terrorist"
            
case CS_TEAM_CTg_team "Counter-Terrorist"
            
default: g_team "Spectator"
    
}
    
    
    if(
client_prefix[id][0])
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^1(%s)^4 %s^3 %s :^4 %s"g_teamclient_prefix[id], g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD* (%s)^4 %s^3 %s :^4 %s"g_teamclient_prefix[id], g_nameg_typed)
        }
    }
    else
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^1(%s)^3 %s :^1 %s"g_teamg_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD* (%s)^3 %s :^1 %s"g_teamg_nameg_typed)
        }
    }
    
    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue
        
        if(
cs_get_user_team(id) == cs_get_user_team(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
        {
            if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
            {
                
message_begin(MSG_ONEg_saytxt, {000}, i)
                
write_byte(id)
                
write_string(g_message)
                
message_end()
            }
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
SetPrefix(id
{
    if(!
get_pcvar_num(g_custom_current) || !flag_custom_current[0])
    {
        
console_print(id"[AdminPrefixes] This option is currently disabled!")
        return 
PLUGIN_HANDLED
    
}
    
    if(!(
get_user_flags(id) & read_flags(flag_custom_current)))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}
    
    
read_args(typed_prefixcharsmax(typed_prefix))
    
remove_quotes(typed_prefix)
    
get_user_name(idg_namecharsmax(g_name))
    
    if(
equal(typed_prefix""))
    {
        
nvault_remove(g_nvaultg_name)
        
console_print(id"[AdminPrefix] You have successfully removed your prefix.")
        
server_print("[AdminPrefix] Player %s removed his prefix"g_name)
        
PutClientPrefix(id)
        return 
PLUGIN_HANDLED
    
}
    
    
replace_all(typed_prefixcharsmax(typed_prefix), "!g""^x04")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!t""^x03")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!n""^x01")
    
    
nvault_set(g_nvaultg_nametyped_prefix)
    
client_prefix[id] = typed_prefix
    
    console_print
(id"[AdminPrefix] You have successfully changed your prefix to  %s"typed_prefix)
    
server_print("[AdminPrefix] Player %s changed his prefix to  %s"g_nametyped_prefix
    
    return 
PLUGIN_HANDLED
}

public 
SetPlayerPrefix(id)
{
    if(!
get_pcvar_num(g_custom_current) || !flag_custom_current[0] || !get_pcvar_num(g_custom_others) || !flag_custom_others[0])
    {
        
console_print(id"[AdminPrefixes] This option is currently disabled!")
        return 
PLUGIN_HANDLED
    
}
    
    if(!(
get_user_flags(id) & read_flags(flag_custom_others)))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
name_tag[64], typed_name[32];
    
    
read_args(name_tagcharsmax(name_tag))
    
remove_quotes(name_tag)
    
parse(name_tagtyped_namecharsmax(typed_name), typed_prefixcharsmax(typed_prefix))
    
get_user_name(idg_namecharsmax(g_name))
    
    new 
target cmd_target(idtyped_name1)
    
    if(!
target)
        return 
PLUGIN_HANDLED
    
    
if(equal(typed_prefix""))
    {
        
nvault_remove(g_nvaulttyped_name)
        
console_print(id"[AdminPrefixes] You have successfully removed ^"%s^"'s prefix."typed_name)
        
server_print("[AdminPrefixes] Player %s removed ^"%s^"'s prefix"g_nametyped_name)
        
PutClientPrefix(target)
        return 
PLUGIN_HANDLED
    
}
    
    
replace_all(typed_prefixcharsmax(typed_prefix), "!g""^x04")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!t""^x03")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!n""^x01")    
    
    
nvault_set(g_nvaulttyped_nametyped_prefix)
    
client_prefix[target] = typed_prefix
    
    console_print
(id"[AdminPrefixes] You have successfully changed ^"%s^"'s prefix to  %s"typed_nametyped_prefix)
    
server_print("[AdminPrefixes] Player %s changed ^"%s^"'s prefix to  %s"g_nametyped_nametyped_prefix
    
    return 
PLUGIN_HANDLED


Bu plugini kurun ve configs klasöründe

admin_prefixes.ini

şeklinde bir dosya oluşturun. İçini şu şekilde ayarlayıp;

Code:
ADMIN_LISTEN l
CUSTOM_CURRENT l
CUSTOM_OTHERS l

"" "b"
"" "d"
"[Server Sahibi]" "l"

kaydedin.[/i][/i][/i][/i]


CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply
#3
Kardeşim Adminlikten Çıkınca Başka Nicke Girince Yanında [Server Sahibi] Yazıyo.Bir Daha Oyundan Çıkıp Girmem Gerekiyor.Bunu Slotdada Denedim.Slotluk Yazıyorum.Giriyorum Yeşil Yazmıyor Ve Yanında Slot Yazmıyor.Ama Çıkıp Girince Oluyor.Yardım Edermisin Bu Konuda?
Coder İmza
PHP Code:
İletişim => cebinihat@hotmail.com 

Model İmza
PHP Code:
İletişim => cebinihat@hotmail.com 

CSP Signatür
PHP Code:
İletişim => cebinihat@hotmail.com 


En İyi Konularım:
Leqend Shop | Furkan Dize Shop |

Reply
#4
Yardimci olacagimda serverinizdeki oto slotu kapatirsanizda olur veya plugini editliyip vereyim.. Seçiminizi yapin vereyim

- - - - - - - - - -

akcaliberkk dateline='' Wrote: Her oyuncuda mı slot yazıyor ? Ayrıca ben bu plugini önermiyorum.

admin prefixes plugini daha iyi;

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

#define FLAG_LOAD ADMIN_CFG
#define MAX_FLAGS 33

new g_listeng_custom_currentg_custom_others;
new 
prefix_count 0prefix_collect[MAX_FLAGS][33], flag_listen[2], flag_custom_current[2], flag_custom_others[2], flags_collect[MAX_FLAGS][2], client_prefix[33][33];
new 
g_saytxtg_maxplayersg_nvault;
new 
g_typed[192], g_message[192], g_name[32], typed_prefix[33];

public 
plugin_init()
{
    
register_plugin("Admin Prefixes""1.0""m0skVi4a ;]")

    
g_listen register_cvar("ap_listen""0")
    
g_custom_current register_cvar("ap_custom_current""1")
    
g_custom_others register_cvar("ap_custom_others""1")

    
g_saytxt get_user_msgid ("SayText")
    
g_maxplayers get_maxplayers()
    
g_nvault nvault_open("CustomAdminPrefixes")

    
register_message(g_saytxt"DuplicateMessage")
    
register_concmd("ap_reloadfile""LoadFile")
    
register_concmd("ap_put""SetPrefix")
    
register_concmd("ap_put_player""SetPlayerPrefix")
    
register_clcmd("say""HookSay")
    
register_clcmd("say_team""HookSayTeam")

    
LoadFile(0)
}
    
public 
LoadFile(id)
{
    if(!(
get_user_flags(id) & FLAG_LOAD))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}

    new 
config_dir[64], file[128], text[64], prefix[32], flags[2], lengthline 0;
    
prefix_count 0
    get_configsdir
(config_dircharsmax(config_dir))
    
formatex(filecharsmax(file), "%s/admin_prefixes.ini"config_dir)

    if(!
file_exists(file)) 
    {
        new 
error[256]
        
formatex(errorcharsmax(error), "[AdminPrefixes] Admin Prefix file - %s not found!"file)
        
set_fail_state(error)
    }

    while(
read_file(fileline textcharsmax(text), length) && prefix_count <= MAX_FLAGS)
    {
        if(!
text[0] || text[0] == '^n' || text[0] == ';')
        {
            
line++
            continue
        }

        
parse(textprefixcharsmax(prefix), flagscharsmax(flags))

        if(!
prefix[0] || !flags[0])
        {
            
line++
            continue
        }

        if(
equal(prefix"ADMIN_LISTEN"))
        {
            
flag_listen flags
            line
++
            continue
        }

        if(
equal(prefix"CUSTOM_CURRENT"))
        {
            
flag_custom_current flags
            line
++
            continue
        }

        if(
equal(prefix"CUSTOM_OTHERS"))
        {
            
flag_custom_others flags
            line
++
            continue
        }

        
replace_all(prefixcharsmax(prefix), "!g""^x04")
        
replace_all(prefixcharsmax(prefix), "!t""^x03")
        
replace_all(prefixcharsmax(prefix), "!n""^x01")

        
prefix_count++
        
prefix_collect[prefix_count] = prefix
        flags_collect
[prefix_count] = flags
        line
++
    }

    if(
flag_listen[0])
    {
        
server_print("[AdminPrefixes] LOADED: Listen Option for players with Flag:  %s"flag_listen)
    }
    if(
flag_custom_current[0])
    {
        
server_print("[AdminPrefixes] LOADED: Custom Prefix Option for players with Flag:  %s",  flag_custom_current)
    }
    if(
flag_custom_others[0])
    {
        
server_print("[AdminPrefixes] LOADED: Setting Custom Prefix Option for players with Flag:  %s"flag_custom_others)
    }
    if(
prefix_count 0)
    {
        for(new 
1<= prefix_counti++)
        {
            
server_print("[AdminPrefixes] LOADED: Prefix: %s for players with Flag:  %s"prefix_collect[i], flags_collect)
        }
    }
    else 
    {
        
server_print("[AdminPrefixes] No Prefixes were been found!")
    }

    
get_user_name(idg_namecharsmax(g_name))
    
server_print("[AdminPrefixes] Plugin's file was been loaded by %s"g_name)
    
console_print(id"[AdminPrefixes] Plugin's file was been loaded!")

    for(new 
1<= g_maxplayersi++)
    {
        
PutClientPrefix(i)
    }

    return 
PLUGIN_HANDLED
}

public 
client_connect(id)
{
    
client_prefix[id] = ""
    
set_task(1.0"PutClientPrefix"id)
}

public 
client_disconnect(id)
{
    
client_prefix[id] = ""
}

public 
PutClientPrefix(id)
{
    new 
nvault_prefix[33];
    
get_user_name(idg_namecharsmax(g_name))

    new 
data nvault_get(g_nvaultg_namenvault_prefixcharsmax(nvault_prefix))

    if(
data && get_pcvar_num(g_custom_current) && flag_custom_current[0] && get_user_flags(id) & read_flags(flag_custom_current))
    {
        
client_prefix[id] = nvault_prefix
    
}
    else
    {
        for(new 
1<= prefix_counti++)
        {
            if(
get_user_flags(id) & read_flags(flags_collect))
            {
                
client_prefix[id] = prefix_collect
            
}
        }
    }
}

public 
DuplicateMessage(id)

    return 
PLUGIN_HANDLED
}

public 
HookSay(id)
{
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)

    if(
equal(g_typed""))
        return 
PLUGIN_CONTINUE

    get_user_name
(idg_namecharsmax(g_name))

    if(
client_prefix[id][0])
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^4%s^3 %s :^4 %s"client_prefix[id], g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD*^4 %s^3 %s :^4 %s"client_prefix[id], g_nameg_typed)
        }
    }
    else
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^3%s :^1 %s"g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD*^3 %s :^1 %s"g_nameg_typed)
        }
    }

    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue;

        if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
        {
            
message_begin(MSG_ONEg_saytxt, {000}, i)
            
write_byte(id)
            
write_string(g_message)
            
message_end()
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
HookSayTeam(id)
{
    new 
g_team[18];

    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)

    if(
equal(g_typed""))
        return 
PLUGIN_CONTINUE

    get_user_name
(idg_namecharsmax(g_name))

    switch(
cs_get_user_team(id))
    {
        case 
CS_TEAM_T:
        {
            
g_team "Terrorist"
        
}
        case 
CS_TEAM_CT:
        {
            
g_team "Counter-Terrorist"
        
}
        default:
        {
            
g_team "Spectator"
        
}
    }

    if(
client_prefix[id][0])
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^1(%s)^4 %s^3 %s :^4 %s"g_teamclient_prefix[id], g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD* (%s)^4 %s^3 %s :^4 %s"g_teamclient_prefix[id], g_nameg_typed)
        }
    }
    else
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^1(%s)^3 %s :^1 %s"g_teamg_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD* (%s)^3 %s :^1 %s"g_teamg_nameg_typed)
        }
    }

    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue

        if(
cs_get_user_team(id) == cs_get_user_team(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
        {
            if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
            {
                
message_begin(MSG_ONEg_saytxt, {000}, i)
                
write_byte(id)
                
write_string(g_message)
                
message_end()
            }
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
SetPrefix(id
{
    if(!
get_pcvar_num(g_custom_current) || !flag_custom_current[0])
    {
        
console_print(id"[AdminPrefixes] This option is currently disabled!")
        return 
PLUGIN_HANDLED
    
}

    if(!(
get_user_flags(id) & read_flags(flag_custom_current)))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}

    
read_args(typed_prefixcharsmax(typed_prefix))
    
remove_quotes(typed_prefix)
    
get_user_name(idg_namecharsmax(g_name))

    if(
equal(typed_prefix""))
    {
        
nvault_remove(g_nvaultg_name)
        
console_print(id"[AdminPrefix] You have successfully removed your prefix.")
        
server_print("[AdminPrefix] Player %s removed his prefix"g_name)
        
PutClientPrefix(id)
        return 
PLUGIN_HANDLED
    
}

    
replace_all(typed_prefixcharsmax(typed_prefix), "!g""^x04")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!t""^x03")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!n""^x01")

    
nvault_set(g_nvaultg_nametyped_prefix)
    
client_prefix[id] = typed_prefix

    console_print
(id"[AdminPrefix] You have successfully changed your prefix to  %s"typed_prefix)
    
server_print("[AdminPrefix] Player %s changed his prefix to  %s"g_nametyped_prefix

    return 
PLUGIN_HANDLED
}

public 
SetPlayerPrefix(id)
{
    if(!
get_pcvar_num(g_custom_current) || !flag_custom_current[0] || !get_pcvar_num(g_custom_others) || !flag_custom_others[0])
    {
        
console_print(id"[AdminPrefixes] This option is currently disabled!")
        return 
PLUGIN_HANDLED
    
}

    if(!(
get_user_flags(id) & read_flags(flag_custom_others)))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}

    new 
name_tag[64], typed_name[32];

    
read_args(name_tagcharsmax(name_tag))
    
remove_quotes(name_tag)
    
parse(name_tagtyped_namecharsmax(typed_name), typed_prefixcharsmax(typed_prefix))
    
get_user_name(idg_namecharsmax(g_name))

    new 
target cmd_target(idtyped_name1)

    if(!
target)
        return 
PLUGIN_HANDLED

    
if(equal(typed_prefix""))
    {
        
nvault_remove(g_nvaulttyped_name)
        
console_print(id"[AdminPrefixes] You have successfully removed ^"%s^"'s prefix."typed_name)
        
server_print("[AdminPrefixes] Player %s removed ^"%s^"'s prefix"g_nametyped_name)
        
PutClientPrefix(target)
        return 
PLUGIN_HANDLED
    
}

    
replace_all(typed_prefixcharsmax(typed_prefix), "!g""^x04")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!t""^x03")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!n""^x01")    

    
nvault_set(g_nvaulttyped_nametyped_prefix)
    
client_prefix[target] = typed_prefix

    console_print
(id"[AdminPrefixes] You have successfully changed ^"%s^"'s prefix to  %s"typed_nametyped_prefix)
    
server_print("[AdminPrefixes] Player %s changed ^"%s^"'s prefix to  %s"g_nametyped_nametyped_prefix

    return 
PLUGIN_HANDLED


Bu plugini kurun ve configs klasöründe

admin_prefixes.ini

şeklinde bir dosya oluşturun. İçini şu şekilde ayarlayıp;

Code:
ADMIN_LISTEN l
CUSTOM_CURRENT l
CUSTOM_OTHERS l

"" "b"
"" "d"
"[Server Sahibi]" "l"

kaydedin.
Haci plugin hatali ilk kontrol et öyle ver bi daha sen ing sitelerden plugini bulmuşsun atmissin ama kodun içeriğinde adam kendi serverine ayarlamis[/i][/i][/i][/i]
Reply
#5
ap_reloadfile yapman gerekiyor. Plugin sadece girişte yetkiye göre kalıcı tag veriyor. Bu yüzden bu plugini öneriyorum. Diğer pluginler her yazı yazışında kontrol ediyor. Bu da performansı boşa kullanması demektir. Nick değişince tagın kalmasının sebebi de bu. Ancak küçük bir değişiklik yaptım. Bunu kullanın.

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

#define FLAG_LOAD ADMIN_CFG
#define MAX_FLAGS 33

new g_listeng_custom_currentg_custom_others;
new 
prefix_count 0prefix_collect[MAX_FLAGS][33], flag_listen[2], flag_custom_current[2], flag_custom_others[2], flags_collect[MAX_FLAGS][2], client_prefix[33][33];
new 
g_saytxtg_maxplayersg_nvault;
new 
g_typed[192], g_message[192], g_name[32], typed_prefix[33];

public 
plugin_init()
{
    
register_plugin("Admin Prefixes""1.0""m0skVi4a ;]")
    
    
g_listen register_cvar("ap_listen""0")
    
g_custom_current register_cvar("ap_custom_current""1")
    
g_custom_others register_cvar("ap_custom_others""1")
    
    
g_saytxt get_user_msgid ("SayText")
    
g_maxplayers get_maxplayers()
    
g_nvault nvault_open("CustomAdminPrefixes")
    
    
register_message(g_saytxt"DuplicateMessage")
    
register_concmd("ap_reloadfile""LoadFile")
    
register_concmd("ap_put""SetPrefix")
    
register_concmd("ap_put_player""SetPlayerPrefix")
    
register_clcmd("say""HookSay")
    
register_clcmd("say_team""HookSayTeam")
    
    
LoadFile(0)
}
public 
client_infochanged(id) {
    
set_task(0.1,"UpdatePrefix",id)
}
public 
UpdatePrefix(id) {
    
client_prefix[id] = "";
    
PutClientPrefix(id)
}
public 
LoadFile(id)
{
    if(!(
get_user_flags(id) & FLAG_LOAD))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
config_dir[64], file[128], text[64], prefix[32], flags[2], lengthline 0;
    
prefix_count 0
    get_configsdir
(config_dircharsmax(config_dir))
    
formatex(filecharsmax(file), "%s/admin_prefixes.ini"config_dir)
    
    if(!
file_exists(file)) 
    {
        new 
error[256]
        
formatex(errorcharsmax(error), "[AdminPrefixes] Admin Prefix file - %s not found!"file)
        
set_fail_state(error)
    }
    
    while(
read_file(fileline textcharsmax(text), length) && prefix_count <= MAX_FLAGS)
    {
        if(!
text[0] || text[0] == '^n' || text[0] == ';')
        {
            
line++
            continue
        }
        
        
parse(textprefixcharsmax(prefix), flagscharsmax(flags))
        
        if(!
prefix[0] || !flags[0])
        {
            
line++
            continue
        }
        
        if(
equal(prefix"ADMIN_LISTEN"))
        {
            
flag_listen flags
            line
++
            continue
        }
        
        if(
equal(prefix"CUSTOM_CURRENT"))
        {
            
flag_custom_current flags
            line
++
            continue
        }
        
        if(
equal(prefix"CUSTOM_OTHERS"))
        {
            
flag_custom_others flags
            line
++
            continue
        }
        
        
replace_all(prefixcharsmax(prefix), "!g""^x04")
        
replace_all(prefixcharsmax(prefix), "!t""^x03")
        
replace_all(prefixcharsmax(prefix), "!n""^x01")
        
        
prefix_count++
        
prefix_collect[prefix_count] = prefix
        flags_collect
[prefix_count] = flags
        line
++
    }
    
    if(
flag_listen[0])
    {
        
server_print("[AdminPrefixes] LOADED: Listen Option for players with Flag:  %s"flag_listen)
    }
    if(
flag_custom_current[0])
    {
        
server_print("[AdminPrefixes] LOADED: Custom Prefix Option for players with Flag:  %s",  flag_custom_current)
    }
    if(
flag_custom_others[0])
    {
        
server_print("[AdminPrefixes] LOADED: Setting Custom Prefix Option for players with Flag:  %s"flag_custom_others)
    }
    if(
prefix_count 0)
    {
        for(new 
1<= prefix_counti++)
        {
            
server_print("[AdminPrefixes] LOADED: Prefix: %s for players with Flag:  %s"prefix_collect[i], flags_collect)
        }
    }
    else 
    {
        
server_print("[AdminPrefixes] No Prefixes were been found!")
    }
    
    
get_user_name(idg_namecharsmax(g_name))
    
server_print("[AdminPrefixes] Plugin's file was been loaded by %s"g_name)
    
console_print(id"[AdminPrefixes] Plugin's file was been loaded!")
    
    for(new 
1<= g_maxplayersi++)
    {
        
PutClientPrefix(i)
    }
    
    return 
PLUGIN_HANDLED
}

public 
client_connect(id)
{
    
client_prefix[id] = ""
    
set_task(1.0"PutClientPrefix"id)
}

public 
client_disconnect(id)
{
    
client_prefix[id] = ""
}

public 
PutClientPrefix(id)
{
    new 
nvault_prefix[33];
    
get_user_name(idg_namecharsmax(g_name))
    
    new 
data nvault_get(g_nvaultg_namenvault_prefixcharsmax(nvault_prefix))
    
    if(
data && get_pcvar_num(g_custom_current) && flag_custom_current[0] && get_user_flags(id) & read_flags(flag_custom_current))
    {
        
client_prefix[id] = nvault_prefix
    
}
    else
    {
        for(new 
1<= prefix_counti++)
        {
            if(
get_user_flags(id) & read_flags(flags_collect))
            {
                
client_prefix[id] = prefix_collect
            
}
        }
    }
}

public 
DuplicateMessage(id)

    return 
PLUGIN_HANDLED
}

public 
HookSay(id)
{
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)
    
    if(
equal(g_typed""))
        return 
PLUGIN_CONTINUE
    
    get_user_name
(idg_namecharsmax(g_name))
    
    if(
client_prefix[id][0])
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^4%s^3 %s :^4 %s"client_prefix[id], g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD*^4 %s^3 %s :^4 %s"client_prefix[id], g_nameg_typed)
        }
    }
    else
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^3%s :^1 %s"g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD*^3 %s :^1 %s"g_nameg_typed)
        }
    }
    
    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue;
        
        if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
        {
            
message_begin(MSG_ONEg_saytxt, {000}, i)
            
write_byte(id)
            
write_string(g_message)
            
message_end()
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
HookSayTeam(id
{
    new 
g_team[18];
    
    
read_args(g_typedcharsmax(g_typed))
    
remove_quotes(g_typed)
    
    if(
equal(g_typed""))
        return 
PLUGIN_CONTINUE
    
    get_user_name
(idg_namecharsmax(g_name))
    
    switch(
cs_get_user_team(id)) {
        case 
CS_TEAM_T:    g_team "Terrorist"
            
case CS_TEAM_CTg_team "Counter-Terrorist"
            
default: g_team "Spectator"
    
}
    
    
    if(
client_prefix[id][0])
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^1(%s)^4 %s^3 %s :^4 %s"g_teamclient_prefix[id], g_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD* (%s)^4 %s^3 %s :^4 %s"g_teamclient_prefix[id], g_nameg_typed)
        }
    }
    else
    {
        if(
is_user_alive(id))
        {
            
formatex(g_messagecharsmax(g_message), "^1(%s)^3 %s :^1 %s"g_teamg_nameg_typed)
        }
        else
        {
            
formatex(g_messagecharsmax(g_message), "^1*DEAD* (%s)^3 %s :^1 %s"g_teamg_nameg_typed)
        }
    }
    
    for(new 
1<= g_maxplayersi++)
    {
        if(!
is_user_connected(i))
            continue
        
        if(
cs_get_user_team(id) == cs_get_user_team(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
        {
            if(
is_user_alive(id) && is_user_alive(i) || !is_user_alive(id) && !is_user_alive(i) || get_pcvar_num(g_listen) && flag_listen[0] && get_user_flags(i) & read_flags(flag_listen))
            {
                
message_begin(MSG_ONEg_saytxt, {000}, i)
                
write_byte(id)
                
write_string(g_message)
                
message_end()
            }
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
SetPrefix(id
{
    if(!
get_pcvar_num(g_custom_current) || !flag_custom_current[0])
    {
        
console_print(id"[AdminPrefixes] This option is currently disabled!")
        return 
PLUGIN_HANDLED
    
}
    
    if(!(
get_user_flags(id) & read_flags(flag_custom_current)))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}
    
    
read_args(typed_prefixcharsmax(typed_prefix))
    
remove_quotes(typed_prefix)
    
get_user_name(idg_namecharsmax(g_name))
    
    if(
equal(typed_prefix""))
    {
        
nvault_remove(g_nvaultg_name)
        
console_print(id"[AdminPrefix] You have successfully removed your prefix.")
        
server_print("[AdminPrefix] Player %s removed his prefix"g_name)
        
PutClientPrefix(id)
        return 
PLUGIN_HANDLED
    
}
    
    
replace_all(typed_prefixcharsmax(typed_prefix), "!g""^x04")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!t""^x03")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!n""^x01")
    
    
nvault_set(g_nvaultg_nametyped_prefix)
    
client_prefix[id] = typed_prefix
    
    console_print
(id"[AdminPrefix] You have successfully changed your prefix to  %s"typed_prefix)
    
server_print("[AdminPrefix] Player %s changed his prefix to  %s"g_nametyped_prefix
    
    return 
PLUGIN_HANDLED
}

public 
SetPlayerPrefix(id)
{
    if(!
get_pcvar_num(g_custom_current) || !flag_custom_current[0] || !get_pcvar_num(g_custom_others) || !flag_custom_others[0])
    {
        
console_print(id"[AdminPrefixes] This option is currently disabled!")
        return 
PLUGIN_HANDLED
    
}
    
    if(!(
get_user_flags(id) & read_flags(flag_custom_others)))
    {
        
console_print(id"[AdminPrefixes] You do not have the flag, needed for using this option!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
name_tag[64], typed_name[32];
    
    
read_args(name_tagcharsmax(name_tag))
    
remove_quotes(name_tag)
    
parse(name_tagtyped_namecharsmax(typed_name), typed_prefixcharsmax(typed_prefix))
    
get_user_name(idg_namecharsmax(g_name))
    
    new 
target cmd_target(idtyped_name1)
    
    if(!
target)
        return 
PLUGIN_HANDLED
    
    
if(equal(typed_prefix""))
    {
        
nvault_remove(g_nvaulttyped_name)
        
console_print(id"[AdminPrefixes] You have successfully removed ^"%s^"'s prefix."typed_name)
        
server_print("[AdminPrefixes] Player %s removed ^"%s^"'s prefix"g_nametyped_name)
        
PutClientPrefix(target)
        return 
PLUGIN_HANDLED
    
}
    
    
replace_all(typed_prefixcharsmax(typed_prefix), "!g""^x04")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!t""^x03")
    
replace_all(typed_prefixcharsmax(typed_prefix), "!n""^x01")    
    
    
nvault_set(g_nvaulttyped_nametyped_prefix)
    
client_prefix[target] = typed_prefix
    
    console_print
(id"[AdminPrefixes] You have successfully changed ^"%s^"'s prefix to  %s"typed_nametyped_prefix)
    
server_print("[AdminPrefixes] Player %s changed ^"%s^"'s prefix to  %s"g_nametyped_nametyped_prefix
    
    return 
PLUGIN_HANDLED

kral0922 dateline='' Wrote: Yardimci olacagimda serverinizdeki oto slotu kapatirsanizda olur veya plugini editliyip vereyim.. Seçiminizi yapin vereyim

- - - - - - - - - -


Haci plugin hatali ilk kontrol et öyle ver bi daha sen ing sitelerden plugini bulmuşsun atmissin ama kodun içeriğinde adam kendi serverine ayarlamis

Bu plugini öylece bulup atmadım. Kendi serverlarımda en az 5 ay kullandım. Ayrıca plugin hatalı değil. Bilmediğiniz, anlamadığınız konularda üç kuruşluk edit bilginizle boş boş konuşup laf kalabalığı yapmayın. Tabi ingilizce bilmediğiniz için o sitenin ne sitesi olduğunu da anlamamışsınızdır. Ayrıca, yanlış bilgilendirici mesajlar göndermek bu bölümde ceza alma sebebidir.[/i][/i][/i][/i]


CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply
#6
Teşekkürler Plugin Çalıştı.Konu "Çözülmüş İstekler"e Taşınabilir...
Coder İmza
PHP Code:
İletişim => cebinihat@hotmail.com 

Model İmza
PHP Code:
İletişim => cebinihat@hotmail.com 

CSP Signatür
PHP Code:
İletişim => cebinihat@hotmail.com 


En İyi Konularım:
Leqend Shop | Furkan Dize Shop |

Reply
#7
Çözülmüş İsteklere taşındı.


CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Plugindeki hata düzeltme caglarinhesap 6 5,085 17-08-18, 20:19
Last Post: dangarma16
  Admin kıyafetleri FarkTR 11 7,610 03-09-17, 18:02
Last Post: tahayasin
  Admin Zombie Model plugini satknun1997 3 3,809 01-01-17, 12:47
Last Post: RuLeT
  Admin slay, slap vs excellenT 3 4,493 22-09-16, 14:16
Last Post: SINCAPP
  Admin Human(insan Modeli) koyma plugini satknun1997 5 3,431 17-07-16, 18:01
Last Post: BYHAZARD7
  /adminfiyat yazınca admin fiyatlarının çıkmasını istiyorum. 7gulgun7 7 4,166 17-07-16, 18:01
Last Post: BYHAZARD7
  Admin'e Özel Gravity Kaqan 9 4,372 17-07-16, 18:00
Last Post: BYHAZARD7
  Host_Error: UserMsg: Not Present on Client 16 bu hata verıyor 2 uc kes buyukısyanda veli067 8 10,282 01-07-15, 01:49
Last Post: mendark06s
  Jb shop plugininde kan bağışla editleme caglarinhesap 15 6,433 19-04-15, 23:08
Last Post: HACIBABA06
  Pluginde hata lütfen yardım :) tarlacixx 2 4,957 10-04-15, 12:45
Last Post: kedusa

Foruma Atla:


Users browsing this thread: