Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile Etme Programı
#5
PHP Code:
/* Fun functions
*
* by Numb
*
* This file is provided as is (no warranties).
*/

#if defined _colorchat_included
  #endinput
#endif
#define _colorchat_included

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(idColor:type, const msg[], {Float,Sql,Result,_}:...)
{
    if( !
get_playersnum() ) return;
    
    new 
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], 251msg4);

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

    new 
teamColorChangeindexMSG_Type;
    
    if(
id)
    {
        
MSG_Type MSG_ONE;
        
index id;
    } else {
        
index FindPlayer();
        
MSG_Type MSG_ALL;
    }
    
    
team get_user_team(index);
    
ColorChange ColorSelection(indexMSG_Typetype);

    
ShowColorMessage(indexMSG_Typemessage);
        
    if(
ColorChange)
    {
        
Team_Info(indexMSG_TypeTeamName[team]);
    }
}

ShowColorMessage(idtypemessage[])
{
    static 
bool:saytext_used;
    static 
get_user_msgid_saytext;
    if(!
saytext_used)
    {
        
get_user_msgid_saytext get_user_msgid("SayText");
        
saytext_used true;
    }
    
message_begin(typeget_user_msgid_saytext_id);
    
write_byte(id)        
    
write_string(message);
    
message_end();    
}

Team_Info(idtypeteam[])
{
    static 
bool:teaminfo_used;
    static 
get_user_msgid_teaminfo;
    if(!
teaminfo_used)
    {
        
get_user_msgid_teaminfo get_user_msgid("TeamInfo");
        
teaminfo_used true;
    }
    
message_begin(typeget_user_msgid_teaminfo_id);
    
write_byte(id);
    
write_string(team);
    
message_end();

    return 
1;
}

ColorSelection(indextypeColor:Type)
{
    switch(
Type)
    {
        case 
RED:
        {
            return 
Team_Info(indextypeTeamName[1]);
        }
        case 
BLUE:
        {
            return 
Team_Info(indextypeTeamName[2]);
        }
        case 
GREY:
        {
            return 
Team_Info(indextypeTeamName[0]);
        }
    }

    return 
0;
}

FindPlayer()
{
    new 
= -1;

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

    return -
1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 


dosyayı metin belgesine yapıştır farklı kaydet de ismini colorchat.inc diye kaydet includes klasörüne at tamamdr.
Reply


Messages In This Thread
Compile Etme Programı - by aprdk - 12-09-12, 20:53
Cevap: Compile Etme Programı - by aprdk - 13-09-12, 00:01
Cevap: Compile Etme Programı - by megasxselar - 13-09-12, 00:21
Cevap: Compile Etme Programı - by aprdk - 13-09-12, 01:45
Cevap: Compile Etme Programı - by aprdk - 13-09-12, 01:33

Possibly Related Threads…
Thread Author Replies Views Last Post
  [JB] Jailbreak Shop (Compile Ederken Hata Veriyor) Nobb 7 6,212 14-01-15, 21:18
Last Post: Neith
  Jail Shop Compile Hatası GreatsGaming 5 4,527 27-08-14, 20:17
Last Post: tifargemirhan
  HOOK COMPİLE HATASI [Unknown directive] tarlacixx 5 2,937 30-07-14, 21:19
Last Post: cropss
  Yönetici Menu Compile Hatası tesekkurkactiL4 2 3,486 19-07-14, 19:46
Last Post: tesekkurkactiL4
  Gelişmiş CTMenu Compile Hatasi (1) tesekkurkactiL4 3 4,848 19-07-14, 17:04
Last Post: bilbaz
  Compile Etme Ve ColorChat EnbuyukBjk 1 2,426 10-10-13, 13:36
Last Post: JDM
  Compile Olmuyor !! EnbuyukBjk 1 2,271 02-10-13, 13:22
Last Post: JDM
  Sunucu Koruma Plugini (Compile Edilmiyor) Nobb 7 4,731 30-09-13, 14:48
Last Post: JDM
  Compile Etme Sorunu Ve 1 rica EnbuyukBjk 3 2,565 24-09-13, 20:26
Last Post: JDM
  Nefesimin Shopunda Compile Sorunu oguzhan029 23 8,020 18-09-13, 12:52
Last Post: JDM

Foruma Atla:


Users browsing this thread: