User
Pass
2FA
 
 

[CERERE] Plugin rang_admin_chatt

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message1769
AsAs !N;x

[Mentally Stable]



Status: Offline
(since 24-02-2019 15:29)
Joined: 19 Apr 2017
Posts: 193, Topics: 10
Location: Romania

Reputation: 164.4
Votes: 2

   
Post Posted: 25-05-2018, 08:14:01 | Translate post to: ... (Click for more languages)

Nume: [CERERE] Plugin rang_admin_chatt
Descriere plugin: as dori un plugin rang_admin_chatt , care in fata la admin sa apara gradul lui ;
Alte detalii: scrisul la admin sa fie verde + o exceptie la rang chat pentru flagul "T" , sa nu mai blocheze chat ( deoarece eu am plugin-ul task_scheduler.amxx , si cand este vipul free playeri au flagul "T" si li se blocheaza automat chatul ) ;
Exemplu: https://imgur.com/a/MN5cMbb .

"abcdefghijklmnopqrsut",
"abcdefghijklmnopqrst",
"bcdefghijmnopqrsut",
"bcdefghijmnopqrst",
"bcdefgijmnpqrt",
"bcdefgijmnpt",
"bcdefgijmnt",
"bcefijmnt",
"bt",
"abit",


"Detinator",
"Owner",
"Co-Owner",
"Maresal",
"General",
"Colonel",
"Maior",
"Sergent",
"Slot,
"VIP",



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
appLy.G

[.::Pred.FreakZ.Ro::.]



Status: Offline
(online 10 hours ago)
Joined: 10 Mar 2018
Posts: 299, Topics: 38
Location: Romania

Reputation: 149
Votes: 14

       
Post Posted: 27-05-2018, 08:27:22 | Translate post to: ... (Click for more languages)

Da-mi sursa de la task_scheduler



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
AsAs !N;x

[Mentally Stable]



Status: Offline
(since 24-02-2019 15:29)
Joined: 19 Apr 2017
Posts: 193, Topics: 10
Location: Romania

Reputation: 164.4
Votes: 2

   
Post Posted: 27-05-2018, 17:27:41 | Translate post to: ... (Click for more languages)

/* AMX Mod script. (Nov 10th, 2002)
*
* Task Scheduler 0.2
* by JustinHoMi
*
* amx_task time "task" flags
* flags:
* m - time is in minutes
* s - time is in seconds
* r - repeat task
* t - specific time
*
*/

#include <amxmodx>

new task_cmds[32][108]
new task_times[32][16]
new numtasks = 0

public load_task()
{
if (read_argc() < 4) {
server_print("[AMX] Usage: amx_task < time > ^"command^" < flags >")
return PLUGIN_HANDLED
}

new args[128]
read_args(args,128)
new clock[6], cmd[108], flags[5]

parse(args,clock,6,cmd,108,flags,5)
new Float:time_f = floatstr(clock)

new flag[2] = ""
if (contain(flags,"r") != -1)
flag="b"
if (contain(flags,"m") != -1)
time_f = time_f * 60

if (contain(flags,"t") != -1)
{
copy(task_cmds[numtasks],108,cmd)
copy(task_times[numtasks],6,clock)
numtasks++
return PLUGIN_HANDLED
}

set_task(time_f,"run_task",0,cmd,108,flag)

return PLUGIN_CONTINUE
}

public run_task(cmd[])
{
server_cmd(cmd)
return PLUGIN_HANDLED
}

public check_time()
{
new curtime[16]
get_time("%H:%M",curtime,16)

for(new i=0; i<numtasks; i++)
if(equal(curtime,task_times[i]))
server_cmd(task_cmds[i])

return PLUGIN_CONTINUE
}

public plugin_init()
{
register_plugin("Task Scheduler","0.2","JustinHoMi")
register_srvcmd("amx_task","load_task")
set_task(60.0,"check_time",1,"",0,"b")
return PLUGIN_CONTINUE
}



Update @ 27-05-2018, 18:27:41

dar eu vreau si plungiul rang_admin_chatt cu scrisul verde la admini..



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
m1xtuLeTs.
[Banned user]


Banned


Status: Offline
(since 27-07-2018 08:55)
Joined: 30 Apr 2018
Posts: 136, Topics: 31
Location: Romania

Reputation: -229.2
Votes: 17

Post Posted: 27-05-2018, 17:33:15 | Translate post to: ... (Click for more languages)

Poftim Aici le pui tu ce rang vrei pe chat!


Casuta vocala : m1xuLeTs

0 0
  
Back to top
View user's profile Send private message
AsAs !N;x

[Mentally Stable]



Status: Offline
(since 24-02-2019 15:29)
Joined: 19 Apr 2017
Posts: 193, Topics: 10
Location: Romania

Reputation: 164.4
Votes: 2

   
Post Posted: 27-05-2018, 18:05:30 | Translate post to: ... (Click for more languages)

da-mi sma direct , te rog



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
appLy.G

[.::Pred.FreakZ.Ro::.]



Status: Offline
(online 10 hours ago)
Joined: 10 Mar 2018
Posts: 299, Topics: 38
Location: Romania

Reputation: 149
Votes: 14

       
Post Posted: 27-05-2018, 18:05:37 | Translate post to: ... (Click for more languages)

Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < cstrike >

#define PLUGIN "Rang Admin Chat Fixed"
#define VERSION "1.0.1"

#pragma semicolon 1

#define   MAX_GROUPS   10


// --| CC_ColorChat.
enum Color
{
   NORMAL = 1,       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
   GREEN,          // Culoare Verde.
   TEAM_COLOR,       // Culoare Rosu, Albastru, Gri.
   GREY,          // Culoarea Gri.
   RED,          // Culoarea Rosu.
   BLUE,          // Culoarea Albastru.
};

new TeamName[  ][  ] =
{
   "",
   "TERRORIST",
   "CT",
   "SPECTATOR"
};
// --| CC_ColorChat.


new g_szGroups[ MAX_GROUPS ][ ] =
{
"Detinator",
"Owner",
"Co-Owner",
"Maresal",
"General",
"Colonel",
"Maior",
"Sergent",
"Slot,
"VIP"

};

new g_szGroupsFlags[ MAX_GROUPS ][ ] =
{

"abcdefghijklmnopqrsut",
"abcdefghijklmnopqrst",
"bcdefghijmnopqrsut",
"bcdefghijmnopqrst",
"bcdefgijmnpqrt",
"bcdefgijmnpt",
"bcdefgijmnt",
"bcefijmnt",
"bt",
"abit"

};

new g_iGroupsFlagsValues[ MAX_GROUPS ];

public plugin_init( )
{
   //Plugin original creat de Ex3cuTioN ( pluginuri-extream/rangadminchat-t81702.html )!
   register_plugin( PLUGIN, VERSION, "Askhanar" );
   
   
   register_clcmd("say","HookClCmdSay");
   register_clcmd("say_team","HookClCmdSayTeam");
   
   for( new i = 0; i < MAX_GROUPS; i++ )
      g_iGroupsFlagsValues[ i ] = read_flags( g_szGroupsFlags[ i ] );
      
   // Add your code here...
}


public HookClCmdSay( id )
{
   
   if( is_user_bot( id ) )
      return PLUGIN_CONTINUE;
   
   static szChat[ 192 ];
   read_args( szChat, sizeof( szChat ) - 1 );
   remove_quotes( szChat );
   
   if( equali( szChat,"" ) )
      return PLUGIN_CONTINUE;
   
   static szName[ 32 ];
   get_user_name( id, szName, sizeof ( szName ) -1 );
      
   if( is_user_admin( id ) )
   {

      for( new i = 0; i < MAX_GROUPS; i++ )
      {
         
         if( get_user_flags( id ) == g_iGroupsFlagsValues[ i ] )
         {
            
            switch( cs_get_user_team( id ) )
            {
               case CS_TEAM_T:      ColorChat( 0, RED,"^x04[%s]^x03 %s^x01: %s", g_szGroups[ i ], szName, szChat );
               case CS_TEAM_CT:   ColorChat( 0, BLUE,"^x04[%s]^x03 %s^x01: %s", g_szGroups[ i ], szName, szChat );
               case CS_TEAM_SPECTATOR:   ColorChat( 0, GREY,"^x04[%s]^x03 %s^x01: %s", g_szGroups[ i ], szName, szChat );
            }
            
            break;
         }
      }
   }
   
   else
   {
      
      switch( cs_get_user_team( id ) )
      {
         case CS_TEAM_T:      ColorChat( 0, RED,"^x03 %s%s^x01: %s", is_user_alive( id ) ? "" : "*Mort* ", szName, szChat );
         case CS_TEAM_CT:   ColorChat( 0, BLUE,"^x03 %s%s^x01: %s", is_user_alive( id ) ? "" : "*Mort* ", szName, szChat );
         case CS_TEAM_SPECTATOR:   ColorChat( 0, GREY,"^x03 %s^x01: %s", szName, szChat );
      }
      
   }
   
   
   return PLUGIN_HANDLED_MAIN;
}

public HookClCmdSayTeam( id )
{
   
   if( is_user_bot( id ) )
      return PLUGIN_CONTINUE;
   
   static szChat[ 192 ];
   read_args( szChat, sizeof( szChat ) - 1 );
   remove_quotes( szChat );
   
   if( equali( szChat,"" ) )
      return PLUGIN_CONTINUE;
   
   static szName[ 32 ];
   get_user_name( id, szName, sizeof ( szName ) -1 );
   
   static iPlayers[ 32 ];
   static iPlayersNum;
   
   get_players( iPlayers, iPlayersNum, "ch" );
   if( !iPlayersNum )
      return PLUGIN_CONTINUE;
               
   static iPlayer, i;
   iPlayer = -1; i = 0;
   
   if( is_user_admin( id ) )
   {
      static x; x = 0;
      
      for( x = 0; x < MAX_GROUPS; x++ )
      {
         
         if( get_user_flags( id ) == g_iGroupsFlagsValues[ x ] )
         {   
            
            for( i = 0; i < iPlayersNum; i++ )
            {
               
               iPlayer = iPlayers[ i ];
      
               if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
               {
                  switch( cs_get_user_team( id ) )
                  {
                     case CS_TEAM_T:      ColorChat( iPlayer, RED, "^x04[%s] ^x03(Terrorist) %s^x01: %s", g_szGroups[ x ], szName, szChat );
                     case CS_TEAM_CT:   ColorChat( iPlayer, BLUE, "^x04[%s] ^x03(Counter-Terrorist) %s^x01: %s", g_szGroups[ x ], szName, szChat );
                     case CS_TEAM_SPECTATOR:   ColorChat( iPlayer, GREY, "^x04[%s] ^x03(Spectator) %s^x01: %s", g_szGroups[ x ], szName, szChat );
                  }
               }
            }
            
            break;
         }
      }
   }
   
   else
   {
         
      for( i = 0; i < iPlayersNum; i++ )
      {
         
         iPlayer = iPlayers[ i ];

         if( cs_get_user_team( id ) == cs_get_user_team( iPlayer ) )
         {
            switch( cs_get_user_team( id ) )
            {
               case CS_TEAM_T:      ColorChat( iPlayer, RED, "^x03(Terrorist)%s%s^x01: %s", is_user_alive( id ) ? "" : "*Mort* ", szName, szChat );
               case CS_TEAM_CT:   ColorChat( iPlayer, BLUE, "^x03(Counter-Terrorist)%s%s^x01: %s", is_user_alive( id ) ? "" : "*Mort* ", szName, szChat );
               case CS_TEAM_SPECTATOR:   ColorChat( iPlayer, GREY, "^x03(Spectator) %s^x01: %s", szName, szChat );
            }
         }
      }
   }
            
   return PLUGIN_HANDLED_MAIN;
}

// From amxmisc.inc
stock is_user_admin( id )
{
   new __flags=get_user_flags(id);
   return (__flags>0 && !(__flags&ADMIN_USER));
}
// -----------------------


// --| CC_ColorChat.
ColorChat(  id, Color:iType, const msg[  ], { Float, Sql, Result, _}:...  )
{
   
   // Daca nu se afla nici un jucator pe server oprim TOT. Altfel dam de erori..
   if( !get_playersnum( ) ) return;
   
   new szMessage[ 256 ];

   switch( iType )
   {
       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
      case NORMAL:   szMessage[ 0 ] = 0x01;
      
      // Culoare Verde.
      case GREEN:   szMessage[ 0 ] = 0x04;
      
      // Alb, Rosu, Albastru.
      default:    szMessage[ 0 ] = 0x03;
   }

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

   // Ne asiguram ca mesajul nu este mai lung de 192 de caractere.Altfel pica server-ul.
   szMessage[ 192 ] = '^0';
   

   new iTeam, iColorChange, iPlayerIndex, MSG_Type;
   
   if( id )
   {
      MSG_Type  =  MSG_ONE_UNRELIABLE;
      iPlayerIndex  =  id;
   }
   else
   {
      iPlayerIndex  =  CC_FindPlayer(  );
      MSG_Type = MSG_ALL;
   }
   
   iTeam  =  get_user_team( iPlayerIndex );
   iColorChange  =  CC_ColorSelection(  iPlayerIndex,  MSG_Type, iType);

   CC_ShowColorMessage(  iPlayerIndex, MSG_Type, szMessage  );
      
   if(  iColorChange  )   CC_Team_Info(  iPlayerIndex, MSG_Type,  TeamName[ iTeam ]  );

}

CC_ShowColorMessage(  id, const iType, const szMessage[  ]  )
{
   
   static bool:bSayTextUsed;
   static iMsgSayText;
   
   if(  !bSayTextUsed  )
   {
      iMsgSayText  =  get_user_msgid( "SayText" );
      bSayTextUsed  =  true;
   }
   
   message_begin( iType, iMsgSayText, _, id  );
   write_byte(  id  );      
   write_string(  szMessage  );
   message_end(  );
}

CC_Team_Info( id, const iType, const szTeam[  ] )
{
   static bool:bTeamInfoUsed;
   static iMsgTeamInfo;
   if(  !bTeamInfoUsed  )
   {
      iMsgTeamInfo  =  get_user_msgid( "TeamInfo" );
      bTeamInfoUsed  =  true;
   }
   
   message_begin( iType, iMsgTeamInfo, _, id  );
   write_byte(  id  );
   write_string(  szTeam  );
   message_end(  );

   return 1;
}

CC_ColorSelection(  id, const iType, Color:iColorType)
{
   switch(  iColorType  )
   {
      
      case RED:   return CC_Team_Info(  id, iType, TeamName[ 1 ]  );
      case BLUE:   return CC_Team_Info(  id, iType, TeamName[ 2 ]  );
      case GREY:   return CC_Team_Info(  id, iType, TeamName[ 0 ]  );

   }

   return 0;
}

CC_FindPlayer(  )
{
   new iMaxPlayers  =  get_maxplayers(  );
   
   for( new i = 1; i <= iMaxPlayers; i++ )
      if(  is_user_connected( i )  )
         return i;
   
   return -1;
}
// --| CC_ColorChat.


Neaparat primul in lista de plugine pentru a functiona corect,sa scoti tot ce tine de culori in chat etc. care pot intra peste el




0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
AsAs !N;x

[Mentally Stable]



Status: Offline
(since 24-02-2019 15:29)
Joined: 19 Apr 2017
Posts: 193, Topics: 10
Location: Romania

Reputation: 164.4
Votes: 2

   
Post Posted: 27-05-2018, 18:24:10 | Translate post to: ... (Click for more languages)

pe ce flag ai pus ?

Update @ 27-05-2018, 19:09:53

nu merge sa-l fac amxx..

Update @ 27-05-2018, 19:24:10

am reusit sa-l pun dar tot cand e vip free playeri nu pot scrie



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
appLy.G

[.::Pred.FreakZ.Ro::.]



Status: Offline
(online 10 hours ago)
Joined: 10 Mar 2018
Posts: 299, Topics: 38
Location: Romania

Reputation: 149
Votes: 14

       
Post Posted: 28-05-2018, 08:14:07 | Translate post to: ... (Click for more languages)

AsAs !N;x wrote:
pe ce flag ai pus ?

Update @ 27-05-2018, 19:09:53

nu merge sa-l fac amxx..

Update @ 27-05-2018, 19:24:10

am reusit sa-l pun dar tot cand e vip free playeri nu pot scrie


Spoiler:


Vezi ca acum merge sa il faci amxx,nu inteleg la ce te referi pe ce flag am pus,chiar tu mi le-ai dat,nici atata minte nu ai?




0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
AsAs !N;x

[Mentally Stable]



Status: Offline
(since 24-02-2019 15:29)
Joined: 19 Apr 2017
Posts: 193, Topics: 10
Location: Romania

Reputation: 164.4
Votes: 2

   
Post Posted: 28-05-2018, 13:05:03 | Translate post to: ... (Click for more languages)

pai tu ce ai modificat la plungiu ? eu am zis sa faci scrisul la admini verde si o exceptie la rang chat pentru flagul "T" , sa nu mai blocheze chat


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
AsAs !N;x

[Mentally Stable]



Status: Offline
(since 24-02-2019 15:29)
Joined: 19 Apr 2017
Posts: 193, Topics: 10
Location: Romania

Reputation: 164.4
Votes: 2

   
Post Posted: 29-05-2018, 14:44:59 | Translate post to: ... (Click for more languages)

up

Update @ 29-05-2018, 15:44:59

am rezolvat puteti da t/c



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 06-05-2024, 09:41:39
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x