⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
Sponsor Görsel
SponsorSponsor

[Pawn] - Get_Players

[PAWN] - Get_Players
Komut: get_players(Players, Num, Flags, Team);
Bulunduğu Kütüphane: Amxmodx
İşlevi: Belirlediğiniz Ayarlar Doğrultusunda Oyuncu Sayısını Çeker.
Örnek Eklenti:
PHP Kod:
#include <amxmodx>

new const PLUGIN[] = "Get_Players";
new const 
VERSION[] = "1.0";
new const 
AUTHOR[] = "By.KinG";

public 
plugin_init()
{
    
register_plugin(PLUGIN, VERSION, AUTHOR);
    
register_event("HLTV", "Event_Round_Start", "a", "1=0", "2=0");
}

public 
Event_Round_Start()
{
    new 
Players[32], Num_All;
    
get_players(Players, Num_All);
    
    
Renkli_Yazi(0, "!t[BILGI] !gOyuncu Sayisi !n: !t%d", Num_All);
}

stock Renkli_Yazi(const ID, const Input[], any:...)
{
    static 
Message[191];
    
vformat(Message, 190, Input, 3);
        
    
replace_all(Message, 190, "!n", "^x01");
    
replace_all(Message, 190, "!g", "^x04");
    
replace_all(Message, 190, "!t", "^x03");
    
    
#if AMXX_VERSION_NUM < 183
    
new Count = 1, Players[32];
    
    if(
ID) Players[0] = ID; else get_players(Players, Count, "ch");
    {
        for(new 
i = 0; i < Count; i++)
        {
            if(
is_user_connected(Players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
                
write_byte(Players[i]);
                
write_string(Message);
                
message_end();
            }
        }
    }
    
#else
    
client_print_color(ID, ID, Message);
    
#endif
} 

PHP Kod:
#include <amxmodx>

new const PLUGIN[] = "Get_Players";
new const 
VERSION[] = "1.0";
new const 
AUTHOR[] = "By.KinG";

public 
plugin_init()
{
    
register_plugin(PLUGIN, VERSION, AUTHOR);
    
register_event("HLTV", "Event_Round_Start", "a", "1=0", "2=0");
}

public 
Event_Round_Start()
{
    new 
Players[32], Num_Alive_T;
    
get_players(Players, Num_Alive_T, "aceh", "TERRORIST");
    
    
Renkli_Yazi(0, "!t[BILGI] !gT Takimindaki Yasayan, Bot ve HLTV Olmayan Oyuncu Sayisi !n: !t%d", Num_Alive_T);
}

stock Renkli_Yazi(const ID, const Input[], any:...)
{
    static 
Message[191];
    
vformat(Message, 190, Input, 3);
        
    
replace_all(Message, 190, "!n", "^x01");
    
replace_all(Message, 190, "!g", "^x04");
    
replace_all(Message, 190, "!t", "^x03");
    
    
#if AMXX_VERSION_NUM < 183
    
new Count = 1, Players[32];
    
    if(
ID) Players[0] = ID; else get_players(Players, Count, "ch");
    {
        for(new 
i = 0; i < Count; i++)
        {
            if(
is_user_connected(Players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
                
write_byte(Players[i]);
                
write_string(Message);
                
message_end();
            }
        }
    }
    
#else
    
client_print_color(ID, ID, Message);
    
#endif
} 
Linksta
Son Düzenleme: 10-09-2020, 02:00, Düzenleyen: By.KinG
Cevapla
RE: [PAWN] Get_Players
@By.KinG Konuyla Alakasız ama bence bı bastan sona pawn dersı guzel olmazmıydı ya Çok güldüm
Cevapla
RE: [PAWN] Get_Players
@Possidentis Baştan sona aşırı uzun olur, zamanım oldukça bunları yapıyorum işte.
Linksta
Cevapla
RE: [PAWN] Get_Players
Teşekkürler yararlı .
Cevapla
RE: [PAWN] Get_Players
@PawNod' Rica Ederim
Linksta
Cevapla
RE: [PAWN] - Get_Players
Konu Güncellendi.
Linksta
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Konuyu Okuyanlar: 1 Ziyaretçi