Discord sunucumuz açılmıştır, hepinizi bekleriz

https://discord.gg/43gGDQe6tS

sma hatasini duzeltirmisiniz

Eklenti sorunlarınız ve özel eklenti istekleriniz

Moderatör: Moderatörler


PaZee
Mesajlar: 1761
Kayıt: Çrş Şub 22, 2017 11:28 pm
Konum: Istanbul
Server Ip/DNS: Cs.teknoklan.com
Clan İsmi: TeknoKlan
İletişim:

sma hatasini duzeltirmisiniz

Mesaj gönderen PaZee »

Buyun

Kod: Tümünü seç

  
 AlliedModders	
Rules	FAQ	Members List	Search
Register	Login

	Monthly Target: $400	Donations: $84
 21% 

Plugins "best player off round" cs 1.6


Post New Thread Reply   	
AlliedModders Forum Index > AMX Mod X > Plugins > Suggestions / Requests
 
Thread Tools  	Display Modes  
Author	Message
yassineihr
Junior Member
Join Date: Apr 2014
Location: Marocco
	
 Old 04-06-2014 , 11:55   Plugins "best player off round" cs 1.6
Reply With Quote #1
hey all , please i want plugins "best palyer off round" with colors and thanks !
yassineihr is offline	

MorrocoAmxx
Member
Join Date: Apr 2014
	
 Old 04-06-2014 , 12:29   Re: Plugins "best player off round" cs 1.6
Reply With Quote #2
This CODE is Integrated AMX 1.8.3
HTML Code:
#include <amxmodx>  
#include <amxmisc>  
#include <hamsandwich>  
#include <cstrike>  

#define PLUGIN    "Bestplayer"  
#define AUTHOR    "Morroco Amxx"  
#define VERSION    "1.0"  




enum Color
{
    NORMAL = 1, // clients scr_concolor cvar color
    GREEN, // Green Color
    TEAM_COLOR, // Red, grey, blue
    GREY, // grey
    RED, // Red
    BLUE, // Blue
}

new TeamName[][] = 
{
    "",
    "TERRORIST",
    "CT",
    "SPECTATOR"
}

ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
    static message[256];

    switch(type)
    {
        case NORMAL: // clients scr_concolor cvar color
        {
            message[0] = 0x01;
        }
        case GREEN: // Green
        {
            message[0] = 0x04;
        }
        default: // White, Red, Blue
        {
            message[0] = 0x03;
        }
    }

    vformat(message[1], 251, msg, 4);

    // Make sure message is not longer than 192 character. Will crash the server.
    message[192] = '^0';

    static team, ColorChange, index, MSG_Type;
    
    if(id)
    {
        MSG_Type = MSG_ONE;
        index = id;
    } else {
        index = FindPlayer();
        MSG_Type = MSG_ALL;
    }
    
    team = get_user_team(index);
    ColorChange = ColorSelection(index, MSG_Type, type);

    ShowColorMessage(index, MSG_Type, message);
        
    if(ColorChange)
    {
        Team_Info(index, MSG_Type, TeamName[team]);
    }
}

ShowColorMessage(id, type, message[])
{
    message_begin(type, get_user_msgid("SayText"), _, id);
    write_byte(id)        
    write_string(message);
    message_end();    
}

Team_Info(id, type, team[])
{
    message_begin(type, get_user_msgid("TeamInfo"), _, id);
    write_byte(id);
    write_string(team);
    message_end();

    return 1;
}

ColorSelection(index, type, Color:Type)
{
    switch(Type)
    {
        case RED:
        {
            return Team_Info(index, type, TeamName[1]);
        }
        case BLUE:
        {
            return Team_Info(index, type, TeamName[2]);
        }
        case GREY:
        {
            return Team_Info(index, type, TeamName[0]);
        }
    }

    return 0;
}

FindPlayer()
{
    static i;
    i = -1;

    while(i <= get_maxplayers())
    {
        if(is_user_connected(++i))
        {
            return i;
        }
    }

    return -1;
} 

new g_iKills[32], g_iHS[32], g_iDmg[32]  

public plugin_init()  
{  
    register_plugin(PLUGIN, VERSION, AUTHOR)  
      
    RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage")  
    register_event("DeathMsg", "EventDeathMsg", "a")  
    register_logevent("RoundEnd", 2, "1=Round_End")  
}  
public client_disconnect(id)  
{  
    g_iDmg[id] = 0;  
    g_iKills[id] = 0;  
    g_iHS[id] = 0;  
}  
public hamTakeDamage(victim, inflictor, attacker, Float:damage, DamageBits)  
{  
    if( 1 <= attacker <= 32)  
    {  
        if(cs_get_user_team(victim) != cs_get_user_team(attacker))  
            g_iDmg[attacker] += floatround(damage)  
        else  
            g_iDmg[attacker] -= floatround(damage)  
    }  
}  
public EventDeathMsg()  
{  
    new killer = read_data(1)  
    new victim = read_data(2)  
    new is_hs = read_data(3)  
      
    if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))  
    {  
        g_iKills[killer]++;  
          
        if(is_hs)  
            g_iHS[killer]++;  
    }  
    else  
        g_iKills[killer]--;  
}  
public RoundEnd()  
{  
    new iBestPlayer = get_best_player()  
      
    new szName[32]  
    get_user_name(iBestPlayer, szName, charsmax(szName)) 

    ColorChat(0, RED, "^3** ^44T En iyi oyuncusu : ^3%s !", szName)  
    ColorChat(0, RED, "^3** ^4He killed ^3%i ^4headshots ile% 3 i ^ 4 oyuncu �ld�rd�.", g_iKills[iBestPlayer], g_iHS[iBestPlayer]) 

    for(new i; i < 31; i++)  
    {  
        g_iDmg[i] = 0;  
        g_iHS[i] = 0;  
        g_iKills[i] = 0;  
    }  
}  
get_best_player()  
{  
    new players[32], num;  
    get_players(players, num);  
    SortCustom1D(players, num, "sort_bestplayer")  
      
    return players[0]  
}  
public sort_bestplayer(id1, id2)  
{  
    if(g_iKills[id1] > g_iKills[id2])  
        return -1;  
    else if(g_iKills[id1] < g_iKills[id2])  
        return 1;  
    else  
    {  
        if(g_iDmg[id1] > g_iDmg[id2])  
            return -1;  
        else if(g_iDmg[id1] < g_iDmg[id2])  
            return 1;  
        else  
            return 0;  
    }  
      
    return 0;  
}
Download ColorChat.inc and add To Include Files And Start Compile 
Attached Files
File Type: inc	colorchat.inc (1.9 KB, 469 views)
MorrocoAmxx is offline	
Old 04-07-2014, 11:14
joshknifer
This message has been deleted by hornet. Reason: Thread cleanup
Old 04-07-2014, 11:30
MorrocoAmxx
This message has been deleted by hornet. Reason: Thread cleanup
Old 04-07-2014, 11:41
joshknifer
This message has been deleted by hornet. Reason: Thread cleanup
Old 08-08-2014, 11:33
morocco_pent3r
This message has been deleted by hornet. Reason: Thread cleanup
Old 08-08-2014, 11:35
morocco_pent3r
This message has been deleted by hornet. Reason: Thread cleanup
Old 08-08-2014, 11:39
joshknifer
This message has been deleted by hornet. Reason: Thread cleanup

Kia
SourceMod Donor
 Kia's Avatar
Join Date: Apr 2010
Location: In a world of madness
	
 Old 08-08-2014 , 16:51   Re: Plugins "best player off round" cs 1.6
Reply With Quote #3
https://forums.alliedmods.net/showthread.php?t=237079
Kia is offline	

noobmodi
Junior Member
Join Date: Feb 2014
	
 Old 08-09-2014 , 07:26   Re: Plugins "best player off round" cs 1.6
Reply With Quote #4
@MorrocAmxx
can u add code for say /me & say /hp as well please?
i m using hlxce, and statx.amxx is bit buggy and laggy..
noobmodi is offline	
Reply	
AlliedModders Forum Index > AMX Mod X > Plugins > Suggestions / Requests

� Previous Thread | Next Thread �


 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 Rules
Forum Jump
Go


All times are GMT -4. The time now is 03:54.

DMCA - Archive - Top

Powered by vBulletin�
Copyright �2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode      

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

seypa
Mesajlar: 1390
Kayıt: Cmt Ağu 13, 2016 12:49 pm
Konum: Pendik/İstanbul
İletişim:

sma hatasini duzeltirmisiniz

Mesaj gönderen seypa »

direk code yi mi kopyaladınız siz :D
Bu mesaja eklenen dosyaları görüntülemek için gerekli izinlere sahip değilsiniz.

Link:
Linklerini gizle
Linki Kopyala
Cevapla