It is currently 17 Jan 2019 22:05



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 8 posts ] 
 join team 
Author Message
Membru, skill 0
Membru, skill 0
User avatar

Joined: 14 Sep 2018 22:35
Posts: 62
Location: Timisoara
Detinator Steam: Da
CS Status: Sniper & Rifler
SteamID: /id/nutu_gl
Fond eXtream: 0
Plugin Cerut: Join team in chat
Descriere (adica ce face el mai exact): cand cineva se conecteaza pe server, si intra intr-o echipa sa apara in chat "Player %s joined CT/T team"
Serverul ruleaza (HLDS/ReHLDS): -
Versiune AMX Mod X: -
Modul Serverului: -

_________________
a simple act of caring creates an endless ripple.
https://www.old-zone.ro/forum


Last edited by Rainq on 13 Jan 2019 02:54, edited 1 time in total.

Editat dupa model



12 Jan 2019 19:03
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1680
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
Code:
#include < amxmodx >

public plugin_init( )   register_event( "TeamInfo", "EventTeamInfo", "a" );

public EventTeamInfo( ) {
    new id = read_data( 1 ),szTeam[ 3 ],name[32];
    read_data( 2, szTeam, 2 );
    get_user_name(id,name,charsmax(name))
   
    switch(szTeam[0])
    {
   case 'C':   client_print(0,print_chat,"Player %s joined CT team",name)
   case 'T':   client_print(0,print_chat,"Player %s joined T team",name)
    }
    return
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


12 Jan 2019 19:38
Profile multumesc ICQ YIM
Membru, skill 0
Membru, skill 0
User avatar

Joined: 14 Sep 2018 22:35
Posts: 62
Location: Timisoara
Detinator Steam: Da
CS Status: Sniper & Rifler
SteamID: /id/nutu_gl
Fond eXtream: 0
apare de doua ori, si cand alegi ct/t si cand iti alegi care din cei 4, si apare la fiecare respawn, la fiecare inceput de runda

_________________
a simple act of caring creates an endless ripple.
https://www.old-zone.ro/forum


12 Jan 2019 19:52
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1680
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
Code:
#include < amxmodx >

public plugin_init( )   register_event( "TeamInfo", "EventTeamInfo", "a" );

public EventTeamInfo( ) {
   new id = read_data( 1 ),szTeam[ 3 ],name[32];
   if(!is_user_connected(id)||is_user_bot(id))   return PLUGIN_HANDLED
   read_data( 2, szTeam, 2 );
   get_user_name(id,name,charsmax(name))
   
   switch(szTeam[0])
   {
      case 'C':
      {
         client_print(0,print_chat,"Player %s joined CT team",name)
         return PLUGIN_HANDLED
      }
      case 'T':
      {
         client_print(0,print_chat,"Player %s joined T team",name)
         return PLUGIN_HANDLED
      }
   }
   
   return PLUGIN_CONTINUE
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


12 Jan 2019 19:59
Profile multumesc ICQ YIM
Membru, skill 0
Membru, skill 0
User avatar

Joined: 14 Sep 2018 22:35
Posts: 62
Location: Timisoara
Detinator Steam: Da
CS Status: Sniper & Rifler
SteamID: /id/nutu_gl
Fond eXtream: 0
aceasi chestie

_________________
a simple act of caring creates an endless ripple.
https://www.old-zone.ro/forum


12 Jan 2019 20:03
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1680
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
Code:
#include < amxmodx >

new name[32]

public plugin_init( )
{   
   register_event("TextMsg", "EVENT_PlayerJoinCT", "b", "2&#Game_join_ct");
   register_event("TextMsg", "EVENT_PlayerJoinT", "b", "2&#Game_join_terrorist");
}

public EVENT_PlayerJoinCT(id)
{
   if(!is_user_connected(id)||is_user_bot(id))   return
   get_user_name(id,name,charsmax(name))
   
   client_print(0,print_chat,"Player %s joined CT team",name)
}
public EVENT_PlayerJoinT(id)
{
   if(!is_user_connected(id)||is_user_bot(id))   return
   get_user_name(id,name,charsmax(name))
   
   client_print(0,print_chat,"Player %s joined T team",name)
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


12 Jan 2019 20:10
Profile multumesc ICQ YIM
Membru, skill 0
Membru, skill 0
User avatar

Joined: 14 Sep 2018 22:35
Posts: 62
Location: Timisoara
Detinator Steam: Da
CS Status: Sniper & Rifler
SteamID: /id/nutu_gl
Fond eXtream: 0
aceasi chestie, apare de doua ori, la fiecare respawn, doar ca nu mai arata la boti :))

_________________
a simple act of caring creates an endless ripple.
https://www.old-zone.ro/forum


12 Jan 2019 20:24
Profile multumesc
Scripter eXtreamCS
Scripter eXtreamCS
User avatar

Joined: 24 Aug 2011 11:24
Posts: 1680
Location: |<()|)
Detinator Steam: Da
CS Status: HLDS Builder
Detinator server CS: liber de contract
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Fond eXtream: 0
| Afiseaza codul
Code:
#include <amxmodx>

new const Terrorist[] = "Terrorist"
new const CounterTerrorist[] = "Counter-Terrorist"
new const Spectator[] = "Spectator"

new bool:g_already_joined[33]

new display_bots, display_once, display_spec,
    te_color, ct_color, sp_color,
    display_type, jtm_text,
    gmsgSayText, g_syncObj

public plugin_init() {
    register_plugin("Join Team Message", "0.2", "connorr")

    display_bots = register_cvar("jtm_bots", "0") // show a hud message if a bot joins a team
    display_once = register_cvar("jtm_once", "1") // show only the first time someone is joining a team
    display_spec = register_cvar("jtm_spec", "0") // show if a player is joining spectator team

    te_color = register_cvar("jtm_t_color", "250 0 0") // RRR GGG BBB
    ct_color = register_cvar("jtm_ct_color", "0 0 250") // RRR GGG BBB
    sp_color = register_cvar("jtm_spec_color", "250 250 250") // RRR GGG BBB

    jtm_text = register_cvar("jtm_text", "!t%name !nis joining the !t%team !nforce") // !t = team color , !n = normal chat color , !g = green

    display_type = register_cvar("jtm_display_type", "2") // 0 : chat , 1 : hud message , 2 : colored chat message

    register_logevent("JoinTeam", 3, "1=joined team")
}

public plugin_cfg() {
    gmsgSayText = get_user_msgid("SayText")
    g_syncObj = CreateHudSyncObj()
}

public client_putinserver(id) {
    g_already_joined[id] = false
}

public JoinTeam() {
    new loguser[80], name[32]
    read_logargv(0, loguser, 79)
    parse_loguser(loguser, name, 31)

    new id = get_user_index(name)

    new once = get_pcvar_num(display_once)
    if( g_already_joined[id] && once )
        return
   
    if( is_user_bot(id) && !get_pcvar_num(display_bots) )
        return

    g_already_joined[id] = true

    new temp[2], team[20], color[12], red[4], green[4], blue[4]
    new type = get_pcvar_num(display_type)

    read_logargv(2, temp, 1)
    switch(temp[0])
    {
        case 'T' :
        {
            formatex(team, 19, Terrorist)
            if(type == 1)
            {
                get_pcvar_string(te_color, color, 11)
                parse(color, red, 3, green, 3, blue, 3)
            }
        }
        case 'C' :
        {
            formatex(team, 19, CounterTerrorist)
            if(type == 1)
            {
                get_pcvar_string(ct_color, color, 11)
                parse(color, red, 3, green, 3, blue, 3)
            }
        }
        case 'S' :
        {
            if( get_pcvar_num(display_spec) )
            {
                formatex(team, 19, Spectator)
                if(type==1)
                {
                    get_pcvar_string(sp_color, color, 11)
                    parse(color, red, 3, green, 3, blue, 3)
                }   
            }
            else
            {
                if( once )
                {
                    g_already_joined[id] = false
                }
                return
            }
        }
    }

    new msg[128]
    get_pcvar_string(jtm_text, msg, 127)
    replace(msg, 127, "%name", name)
    replace(msg, 127, "%team", team)

    switch(type)
    {
        case 0:
        {
            replace_all(msg, 127, "!n", "")
            replace_all(msg, 127, "!t", "")
            replace_all(msg, 127, "!g", "")
            client_print(0, print_chat, msg)
        }
        case 1:
        {
            replace_all(msg, 127, "!n", "")
            replace_all(msg, 127, "!t", "")
            replace_all(msg, 127, "!g", "")
            set_hudmessage(str_to_num(red), str_to_num(green), str_to_num(blue), -1.0, 0.35, 0, 6.0, 12.0, 0.1, 0.2, -1)
            ShowSyncHudMsg(0, g_syncObj, msg)
        }
        case 2:
        {
            replace_all(msg, 127, "!n", "^x01")
            replace_all(msg, 127, "!t", "^x03")
            replace_all(msg, 127, "!g", "^x04")
            message_begin(MSG_ALL, gmsgSayText)
            write_byte(id)
            write_string(msg)
            message_end()
        }
    }
}

_________________
Stick with the best & regards Adryyy .


x , daNzeT , Arion , Chaos , Exolent , aNNakin , PoSiTiOn Of PoWeR , ExoTiQ , -UnQ- UHD , ViciousVixen , Arkshine , Askhanar , KronoS eXtream , alkaline , CryWolf , Fuffy , tre3fla , Rap^ , Hades Ownage , xPaw .


12 Jan 2019 20:48
Profile multumesc ICQ YIM
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: renegade, sancez and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group