VIP

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

16 Oct 2012, 10:40

As dori si eu sa mi modificati acest .sma va rog frumos.
Las dori sa mearga cu flags "bceij" si sa aiba acces decat vipii nu si adminii si slotu
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
RoyalServer
User avatar
Ryuk@DeathNote
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 16 Oct 2012, 10:13
Detinator Steam: Nu
Been thanked: 2 times
Contact:

16 Oct 2012, 10:43

posteaza sma-ul !
si te ajut cu cea mai mare placere !~
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

16 Oct 2012, 10:48

Uite aici | Afiseaza codul
#include <amxmodx>
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "VIP Sistem"
#define VERSION "1.0"
#define AUTHOR "sDs|Aragon*"

#define VIP_LEVEL ADMIN_LEVEL_D
#pragma semicolon 1

static const COLOR[] = "^x04"; // Green for display VIP
new CvarHPBonus, CvarAPBonus;
new bool:killed[33];
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");
	CvarHPBonus = register_cvar("vip_hp_bonus", "15");
	CvarAPBonus = register_cvar("vip_ap_bonus", "15");
	RegisterHam(Ham_Killed, "player", "KilledPlayer");
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);
	register_message(get_user_msgid("ScoreAttrib"),"vip_scoreboard");
	}
public plugin_precache() {
	precache_model("models/player/vip/vip.mdl");
	precache_model("models/player/vip/vip.mdl");
	}
	
public KilledPlayer(victim, killer, shouldgib) {
	killed[killer] ++;
	}
	
public Spawn(id)
	if(get_user_flags(id) & VIP_LEVEL) {
	set_task(1.0,"GiveItems",id);	
	}
	
public GiveItems(id) {
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	cs_set_user_model(id, "vip");
	if(killed[id]) {
	ColorChat(id,"Ai primit %dHP si %dAP pentru uciderea inamicilor",(get_pcvar_num(CvarHPBonus) * killed[id]), (get_pcvar_num(CvarAPBonus) * killed[id]));
	set_task(0.1,"givehp",id,_,_,"b");
	}
	}
	
public givehp(id) {
	if(killed[id]) {
	killed[id]--;
	set_user_health(id, get_user_health(id) + get_pcvar_num(CvarHPBonus));
	set_user_armor(id, get_user_armor(id) + get_pcvar_num(CvarAPBonus));
	}
	else {
	remove_task(id);
	}
	}
	
public print_adminlist(user) {
	new adminnames[33][32];
	new message[256];
	new id, count, x, len;
	
	for(id = 1 ; id <= get_maxplayers() ; id++)
	if(is_user_connected(id))
	if(get_user_flags(id) & VIP_LEVEL)
	get_user_name(id, adminnames[count++], 31);

	len = format(message, 255, "%s VIP ONLINE: ",COLOR);
	if(count > 0) {
	for(x = 0 ; x < count ; x++) {
	len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
	if(len > 96) {
	print_message(user, message);
	len = format(message, 255, "%s ",COLOR);
	}
	}
	print_message(user, message);
	}
	else {
	len += format(message[len], 255-len, "No VIP online.");
	print_message(user, message);
	}
	}
	
print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
	}
	
public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
	set_task(0.1,"print_adminlist",id);
	return PLUGIN_CONTINUE;
	}
	
public vip_scoreboard(const MsgId, const MsgType, const MsgDest) {
	static id;
	id = get_msg_arg_int(1);
	if(get_user_flags(id) & VIP_LEVEL)
	set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
	}
	
stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
 
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
 
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
	for(new i = 0; i < count; i++) {
	if(is_user_connected(players)) {
	message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
	write_byte(players);
	write_string(msg);
	message_end();
	}
	}
	} 
	}


Si daca se poate sa pui si un smoke care in gheata .. :D

Si daca te mai rog ceva nu ma lasa sa-l copilez pluginu asta ultimate_who daca doresti tu sa mil copiezi uit si sma-ul de la el
ultimate_who | Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN         "ULTIMATE WHO"
#define VERSION         "1.1"
#define AUTHOR         "PoSiTiOn Of PoWeR "

#define CharsMax(%1)      sizeof %1 - 1
#define time_shower      1.0

#define GROUPS_NAME      8
#define GROUPS_ACCESS   8

#define RRR         255
#define GGG         255
#define BBB         255
#define time_hud      12.0

#define motd_msg      "Admini Online"

#define who_meniu_ad_group_msg   "\y-=[Admin's]=- \r-=[Online]=-^n"
#define who_meniu_admin_msg   "\y-=[Admin's]=- \w-=[Online]=-^n^n"

#define who_meniu_ad_group_msg_bottom   "^n\wPt a iesi apasati \y0 \w sau \y5"
#define who_meniu_admin_msg_bottom   "^n\wPt a iesi apasati \r0 \w sau \r5"

#define   who_console_top      "=============       Admini Online      =============="
#define   who_console_bottom    "====================================================="

new GroupNames[GROUPS_NAME][] = {
   "-->Detinator--<",
   "-->Owner--<",
   "-->God--<",
   "-->Moderator--<",
   "-->Administrator--<",
   "-->Helper--<",
   "-->Slot--<"
}

new GroupFlags[GROUPS_ACCESS][] = {
   "abcdefghijklmnopqrstu",
   "bcdefghijkmnopqrstu",
   "bcdefghijkmnopqrst",
   "bcdefgijmnopqr",
   "bcdefgijmnop",
   "bcdefi",
   "b"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu, who_typtable

public plugin_init() 
{
   
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
      GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
   register_clcmd("say", "cmdSay")
   register_clcmd("say_team", "cmdSay")
   
   who_type   = register_cvar("cmd_who","1")
   who_typemeniu   = register_cvar("who_typemeniu","1")
   who_typtable   = register_cvar("who_typetable","2")
}

public cmdSay(id)
{
   new say[192]
   read_args(say,192)
   if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1  || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
      set_task(time_shower,"cmdULTMWho",id)
   return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
   switch(get_pcvar_num(who_type))
   {
      case 1: who_meniu(id)
      
      case 2: who_motd(id)
      
      case 3: who_table(id)
      
      case 4: who_hud(id)
      
      case 5: who_console(id)
      
   }
   return 0
}

who_meniu(id)
{
   switch(get_pcvar_num(who_typemeniu))
   {
      case 1: who_meniu_admin_groups(id)
      
      case 2: who_meniu_admin(id)
   }
   return 0
}
who_meniu_admin_groups(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32]
   new szMenu[256], nLen, keys
   
   nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
   get_players(sPlayers, iNum, "ch")
   
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
   {   
      nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", GroupNames[p_of_pw])
     
      for(new a = 0; a < iNum ; a++)
      {   
         iPlayer = sPlayers[a]
         
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
         {
            get_user_name(iPlayer, sName, sizeof sName - 1)
            nLen += format(szMenu[nLen], 255-nLen,"\w%s^n", sName)
         }   
      }
   }
   nLen += format(szMenu[nLen], 255-nLen, who_meniu_ad_group_msg_bottom)
   keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
   show_menu(id,keys,szMenu,-1)
   return 0
}

who_meniu_admin(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32]
   new szMenu[256], nLen, keys
   
   nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)
  
   get_players(sPlayers, iNum, "ch")
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
   {
      for(new a = 0; a < iNum ; a++)
      {   
         iPlayer = sPlayers[a]
         
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
         {
            get_user_name(iPlayer, sName, sizeof sName - 1)
            nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", sName)
         }   
      }
   }
   nLen += format(szMenu[nLen], 255-nLen, who_meniu_admin_msg_bottom)
   keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
   show_menu(id,keys,szMenu,-1)
   return 0
}

who_motd(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32], sBuffer[1024]
   new iLen
   
   iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
   get_players(sPlayers, iNum, "ch")
   
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
   {   
      iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
      for(new a = 0; a < iNum ; a++)
      {   
         iPlayer = sPlayers[a]
         
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
         {
            get_user_name(iPlayer, sName, sizeof sName - 1)
            iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName)
         }
      }      
   }
   show_motd(id, sBuffer, motd_msg)
   return 0

}

who_table(id)
{
   switch(get_pcvar_num(who_typtable))
   {
      case 1: table_style_one(id)
      
      case 2: table_style_two(id)
   }
   return 0
}
table_style_one(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32], sBuffer[1024]
   new iLen
   
   iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h3><b><font color=^"red^">NUME         -   ACCES</font></h3></b></center>")
   
   get_players(sPlayers, iNum, "ch")
   
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
   {
      for(new a = 0; a < iNum ; a++)
      {   
         iPlayer = sPlayers[a]
      
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
         {
            get_user_name(iPlayer, sName, sizeof sName - 1)
            iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h4><font color=^"white^">%s      %s^n</font></h4></center>", sName, GroupNames[p_of_pw])
         }
      }      
   }
   show_motd(id, sBuffer, motd_msg)
   return 0
}
table_style_two(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32], sBuffer[1024]
   new iLen
   
   iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
   iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<html><head><title>a</title></head>")
   iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<br><br><center><body><table border>")
   iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<tr><td><h3><b><font color=^"red^">NUME</td><td></h3></b> <h3><b><font color=^"red^">ACCES</td></h3></font></b></center>")
   
   get_players(sPlayers, iNum, "ch")
   
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
   {
      for(new a = 0; a < iNum ; a++)
      {   
         iPlayer = sPlayers[a]
      
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
         {
            get_user_name(iPlayer, sName, sizeof sName - 1)
            iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><tr><td><h4><b><font color=^"white^">%s<td></b></h4> <h4><b><font color=^"white^">%s </td></h4></font></b></center>", sName, GroupNames[p_of_pw])
         }
      }      
   }
   iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "</table></body></html>")
   show_motd(id, sBuffer, motd_msg)
   return 0
}

who_hud(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32], sBuffer[1024]
   new iLen
   
   get_players(sPlayers, iNum, "ch")
   
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
   {   
      iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])
     
      for(new a = 0; a < iNum ; a++)
      {   
         iPlayer = sPlayers[a]
         
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
         {
            get_user_name(iPlayer, sName, sizeof sName - 1)
            iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
         }
      }      
   }
   set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
   show_hudmessage(id, sBuffer)
   return 0
}

who_console(id)
{
   new sPlayers[32], iNum, iPlayer
   new sName[32]

   get_players(sPlayers, iNum)
   console_print(id, who_console_top)
   for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++) 
   {
      for(new a = 0; a < iNum ; a++)
      {
         
         iPlayer = sPlayers[a]
         get_user_name(iPlayer, sName, sizeof sName - 1)
         if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) 
            console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)
         
         
      }
   }
   console_print(id, who_console_bottom)
   return 0
}


S daca poti sa mile copilezi pe am2 dar daca nu macar pe vip :D
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Soke
Membru, skill +1
Membru, skill +1
Posts: 248
Joined: 31 May 2012, 21:58
Detinator Steam: Da
CS Status: Umblu pe forum
Detinator server CS: Da
SteamID: MorenuRaulAndrei
Has thanked: 11 times
Been thanked: 16 times
Contact:

16 Oct 2012, 15:10

ultimate_who = http://www.girlshare.ro/31821704.2
revin cu vipu


EDIT: vip - http://www.girlshare.ro/31821730.6

ATENTIE !! NU SUNT TESTATE
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

16 Oct 2012, 18:52

Aolo am gresit am uitat la ultimate ala sa pun VIP :| daca te rog frumos sa adaugi tu si sa-l mai copilezi odata :|
Scuze dar ma grabisem .. | Afiseaza codul
new GroupNames[GROUPS_NAME][] = {
   "-->Detinator--<",
   "-->Owner--<",
   "-->God--<",
   "-->Moderator--<",
   "-->Administrator--<",
   "-->Helper--<",
   "-->Slot--<",
   "-->VIP--<"
}
Si vipu e bun merge dar doresc sa bagi si smoke care in gheata daca te rog el e bun asa vreau sa mi dea 1 HE 2 flash si un smoke care ingheata dar nu complet putin si cand ii da drumu sa lase o urma stiti ce zic sper ..
Si daca poti copila acest plugin ca imi da eroare mie
rang_admin_chat | Afiseaza codul
/* Fisier descarcat de pe www.laleagane.ro! */

#include < amxmodx >
#include < amxmisc >

#define PLUGIN "rang_admin_chat"
#define VERSION "3.1"
#define AUTHOR "Anonim"

#define	GROUPS	8

enum Color
{
	NORMAL = 1,
	GREEN,
	TEAM_COLOR,
	GREY,
	RED,
	BLUE,
}

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

// - - - - - - - - - - -

#define	GROUPS	10

new const g_Flags[ GROUPS ][ ] =
{
      "abcdefghijklmnopqrstu",
      "bcdefghijkmnopqrstu",
      "bcdefghijkmnopqrst",
      "bcdefgijmnopqr",
      "bcdefgijmnop",
      "bcdefi",
      "b",
      "bceij"
	
};

new const g_Groups[ GROUPS ][ ] =
{ 
   "-->Detinator--<",
   "-->Owner--<",
   "-->God--<",
   "-->Moderator--<", 
   "-->Administrator--<", 
   "-->Helper--<", 
   "-->Slot--<", 
   "-->VIP--<"
};

// - - - - - - - - - - -

new g_FlagsValue[ GROUPS ];

new bool:g_IsConnected[ 33 ];
new SayText, TeamInfo, g_maxplayers;

public plugin_init ( )
{
	register_plugin ( PLUGIN, VERSION, AUTHOR );
	
	register_clcmd ( "say", "hook_say" );
	register_clcmd ( "say_team", "hook_say" );
	
	for ( new i; i < GROUPS; i++ )
		g_FlagsValue[ i ] = read_flags ( g_Flags[ i ] );
		
	SayText = get_user_msgid ( "SayText" );
	TeamInfo = get_user_msgid ( "TeamInfo" );
	g_maxplayers = get_maxplayers ( );
}

public client_putinserver ( e_Index ) g_IsConnected[ e_Index ] = true;
public client_disconnect ( e_Index ) g_IsConnected[ e_Index ] = false;

public hook_say ( e_Index )
{
	static s_Said[ 192 ];
	read_args ( s_Said, charsmax ( s_Said ) );
	
	if ( equal ( s_Said, "" ) )
		return PLUGIN_CONTINUE;
	remove_quotes ( s_Said );
	
	static s_Name[ 32 ], i;
	get_user_name ( e_Index, s_Name, 31 );
	
	for ( i = 0; i < GROUPS; i++ )
		if ( get_user_flags ( e_Index ) == g_FlagsValue[ i ] )
		{
			ColorChat ( 0, RED, "^x01[^x04%s^x01]^x03 %s^x01^x04: %s", g_Groups[ i ], s_Name, s_Said );
			break;
		}
		
	return ( i < GROUPS ) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}

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

	switch ( type )
	{
		case NORMAL:
			message[ 0 ] = 0x01;
		case GREEN:
			message[ 0 ] = 0x04;
		default:
			message[ 0 ] = 0x03;
	}

	vformat ( message[ 1 ], 251, msg, 4 );
	message[ 192 ] = '^0';

	new 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, SayText, _, id );
	write_byte ( id )		
	write_string ( message );
	message_end ( );	
}

Team_Info ( id, type, team[] )
{
	message_begin ( type, 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;
}

public FindPlayer ( )
{	
	for ( new i = 1; i <= g_maxplayers; i++ )
		if ( g_IsConnected[ i ] )
			return i;
	
	return -1;
}
Asta daca doresti daca nu lasa decat aia cu vip sa o faci sa bagi smoke ala si sa copilezi din nou ala te rog frumos si sa bagi si vipu ca am uitat eu :| scuzzele mele :|
si ai cate +1 la fiecare post postat aici adica toti veti avea ;)
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

16 Oct 2012, 19:16

si scuze de 2x post dar nu pot edita postu de sus
daca se poate ca vipu sa nu se poata da la celalate grade decat la acestea
"-->Detinator--<",
"-->Owner--<",
"-->God--<",
Atata va rog /te rog :D
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
tre3fla
Membru eXtream
Membru eXtream
Posts: 5317
Joined: 27 May 2012, 11:15
Detinator Steam: Da
CS Status: Allah Akbar !
Detinator server CS: Nu
SteamID: /id/tre3fla_xxx
Has thanked: 14 times
Been thanked: 129 times

16 Oct 2012, 22:06

Rang Chat | Afiseaza codul
/* Fisier descarcat de pe http://www.laleagane.ro! */

#include < amxmodx >
#include < amxmisc >

#define PLUGIN "rang_admin_chat"
#define VERSION "3.1"
#define AUTHOR "Anonim"

#define	GROUPS	8

enum Color
{
	NORMAL = 1,
	GREEN,
	TEAM_COLOR,
	GREY,
	RED,
	BLUE,
}

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

#define	GROUPS	8

new const g_Flags[ GROUPS ][ ] =
{
      "abcdefghijklmnopqrstu",
      "bcdefghijkmnopqrstu",
      "bcdefghijkmnopqrst",
      "bcdefgijmnopqr",
      "bcdefgijmnop",
      "bcdefi",     
      "bceij",
      "b"	
};

new const g_Groups[ GROUPS ][ ] =
{ 
   "Detinator",
   "Owner",
   "God",
   "Moderator", 
   "Administrator", 
   "Helper", 
   "VIP", 
   "Slot"
};

new g_FlagsValue[ GROUPS ];

new bool:g_IsConnected[ 33 ];
new SayText, TeamInfo, g_maxplayers;

public plugin_init ( )
{
	register_plugin ( PLUGIN, VERSION, AUTHOR );
	
	register_clcmd ( "say", "hook_say" );
	register_clcmd ( "say_team", "hook_say" );
	
	for ( new i; i < GROUPS; i++ )
		g_FlagsValue[ i ] = read_flags ( g_Flags[ i ] );
		
	SayText = get_user_msgid ( "SayText" );
	TeamInfo = get_user_msgid ( "TeamInfo" );
	g_maxplayers = get_maxplayers ( );
}

public client_putinserver ( e_Index ) g_IsConnected[ e_Index ] = true;
public client_disconnect ( e_Index ) g_IsConnected[ e_Index ] = false;

public hook_say ( e_Index )
{
	static s_Said[ 192 ];
	read_args ( s_Said, charsmax ( s_Said ) );
	
	if ( equal ( s_Said, "" ) )
		return PLUGIN_CONTINUE;
	remove_quotes ( s_Said );
	
	static s_Name[ 32 ], i;
	get_user_name ( e_Index, s_Name, 31 );
	
	for ( i = 0; i < GROUPS; i++ )
		if ( get_user_flags ( e_Index ) == g_FlagsValue[ i ] )
		{
			ColorChat ( 0, RED, "^x01[^x04%s^x01]^x03 %s^x01^x04: %s", g_Groups[ i ], s_Name, s_Said );
			break;
		}
		
	return ( i < GROUPS ) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
}

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

	switch ( type )
	{
		case NORMAL:
			message[ 0 ] = 0x01;
		case GREEN:
			message[ 0 ] = 0x04;
		default:
			message[ 0 ] = 0x03;
	}

	vformat ( message[ 1 ], 251, msg, 4 );
	message[ 192 ] = '^0';

	new 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, SayText, _, id );
	write_byte ( id )		
	write_string ( message );
	message_end ( );	
}

Team_Info ( id, type, team[] )
{
	message_begin ( type, 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;
}

public FindPlayer ( )
{	
	for ( new i = 1; i <= g_maxplayers; i++ )
		if ( g_IsConnected[ i ] )
			return i;
	
	return -1;
}


Ultimate Who | Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN			"ULTIMATE WHO"
#define VERSION			"1.1"
#define AUTHOR			"P.Of.Pw"

#define CharsMax(%1)		sizeof %1 - 1
#define time_shower		1.0

#define GROUPS_NAME		8
#define GROUPS_ACCESS		8

#define RRR			255
#define GGG			255
#define BBB			255
#define time_hud		12.0

#define motd_msg		"Admin's Online"

#define who_meniu_ad_group_msg	"\y-=[Admin's]=- \r-=[Online]=-^n"
#define who_meniu_admin_msg	"\y-=[Admin's]=- \w-=[Online]=-^n^n"

#define who_meniu_ad_group_msg_bottom	"^n\wPt a esi apasati \y0 \w sau \y5"
#define who_meniu_admin_msg_bottom	"^n\wPt a esi apasati \r0 \w sau \r5"

#define	who_console_top		"=========== Admini Online ==========="
#define	who_console_bottom 	"================================"

new GroupNames[GROUPS_NAME][] = {
	"Detinator",
   "Owner",
   "God",
   "Moderator", 
   "Administrator", 
   "Helper", 
   "VIP", 
   "Slot"
}

new GroupFlags[GROUPS_ACCESS][] = {
	"abcdefghijklmnopqrstu",
      "bcdefghijkmnopqrstu",
      "bcdefghijkmnopqrst",
      "bcdefgijmnopqr",
      "bcdefgijmnop",
      "bcdefi",     
      "bceij",
      "b"
}

new GroupFlagsValue[GROUPS_NAME]

new who_type, who_typemeniu, who_typtable

public plugin_init() 
{
   
	register_plugin(PLUGIN, VERSION, AUTHOR)
   
	for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++)
		GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw])
   
	register_clcmd("say", "cmdSay")
	register_clcmd("say_team", "cmdSay")
	
	who_type	= register_cvar("cmd_who","1")
	who_typemeniu	= register_cvar("who_typemeniu","1")
	who_typtable	= register_cvar("who_typetable","2")
}

public cmdSay(id)
{
	new say[192]
	read_args(say,192)
	if(( containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1  || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1))
		set_task(time_shower,"cmdULTMWho",id)
	return PLUGIN_CONTINUE
}

public cmdULTMWho(id)
{
	switch(get_pcvar_num(who_type))
	{
		case 1: who_meniu(id)
		
		case 2: who_motd(id)
		
		case 3: who_table(id)
		
		case 4: who_hud(id)
		
		case 5: who_console(id)
		
	}
	return 0
}

who_meniu(id)
{
	switch(get_pcvar_num(who_typemeniu))
	{
		case 1: who_meniu_admin_groups(id)
		
		case 2: who_meniu_admin(id)
	}
	return 0
}
who_meniu_admin_groups(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
	
	nLen = format(szMenu[nLen], 255, who_meniu_ad_group_msg)
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"\w%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen, who_meniu_ad_group_msg_bottom)
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_meniu_admin(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]
	new szMenu[256], nLen, keys
   
	nLen = format(szMenu[nLen], 255, who_meniu_admin_msg)
  
	get_players(sPlayers, iNum, "ch")
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				nLen += format(szMenu[nLen], 255-nLen,"\r%s^n", sName)
			}   
		}
	}
	nLen += format(szMenu[nLen], 255-nLen, who_meniu_admin_msg_bottom)
	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
	show_menu(id,keys,szMenu,-1)
	return 0
}

who_motd(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
   
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"red^">%s^n</font></h5></center>", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName)
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0

}

who_table(id)
{
	switch(get_pcvar_num(who_typtable))
	{
		case 1: table_style_one(id)
		
		case 2: table_style_two(id)
	}
	return 0
}
table_style_one(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h3><b><font color=^"red^">NUME			-	ACCES</font></h3></b></center>")
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
		
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h4><font color=^"white^">%s		%s^n</font></h4></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	show_motd(id, sBuffer, motd_msg)
	return 0
}
table_style_two(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>")
	
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<html><head><title>a</title></head>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<br><br><center><body><table border>")
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<tr><td><h3><b><font color=^"red^">NUME</td><td></h3></b> <h3><b><font color=^"red^">ACCES</td></h3></font></b></center>")
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
		
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><tr><td><h4><b><font color=^"white^">%s<td></b></h4> <h4><b><font color=^"white^">%s </td></h4></font></b></center>", sName, GroupNames[p_of_pw])
			}
		}		
	}
	iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "</table></body></html>")
	show_motd(id, sBuffer, motd_msg)
	return 0
}

who_hud(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32], sBuffer[1024]
	new iLen
	
	get_players(sPlayers, iNum, "ch")
   
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++)
	{   
		iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "=== %s ===^n", GroupNames[p_of_pw])
     
		for(new a = 0; a < iNum ; a++)
		{   
			iPlayer = sPlayers[a]
         
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
			{
				get_user_name(iPlayer, sName, sizeof sName - 1)
				iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "%s^n", sName)
			}
		}		
	}
	set_hudmessage(RRR, GGG, BBB, 0.02, 0.24, 0, 6.0, time_hud)
	show_hudmessage(id, sBuffer)
	return 0
}

who_console(id)
{
	new sPlayers[32], iNum, iPlayer
	new sName[32]

	get_players(sPlayers, iNum)
	console_print(id, who_console_top)
	for(new p_of_pw = 0; p_of_pw < GROUPS_NAME; p_of_pw++) 
	{
		for(new a = 0; a < iNum ; a++)
		{
			
			iPlayer = sPlayers[a]
			get_user_name(iPlayer, sName, sizeof sName - 1)
			if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) 
				console_print(id, "= %d = %s : %s", p_of_pw+1, GroupNames[p_of_pw], sName)
			
			
		}
	}
	console_print(id, who_console_bottom)
	return 0
}


Cat despre VIP nu inteleg exact ce vrei sa zici, daca vrei ti-l pot pune pe o anumita litera de acces,daca vrei sa-i adaugi VIP-ului comenzi aditionale ii pui flagurile specifice al accesu din users. Iti recomand accesul ADMIN_LEVEL_H (adica flagul "t") sau ADMIN_LEVEL_F (adica flagul "r")
P.S : Daca vrei smoke inghetat iti trebuiesc grenazi care ingheata... (Frost Nades)
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

16 Oct 2012, 23:04

Da vreau cum zici tu si cand dau admine intrun in user.in si tot la fel dau "name" "parola" "r" "a" ?
Si vreau smoku ala decat la vip sa fie .. si vreau ca vipu sa poata da kick,slay,gag astea slap si vote
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

17 Oct 2012, 21:08

Up ?
Se poate ajuta ?
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Soke
Membru, skill +1
Membru, skill +1
Posts: 248
Joined: 31 May 2012, 21:58
Detinator Steam: Da
CS Status: Umblu pe forum
Detinator server CS: Da
SteamID: MorenuRaulAndrei
Has thanked: 11 times
Been thanked: 16 times
Contact:

18 Oct 2012, 12:12

Poftim la vip cu smoke :) daca vrei sa inchete cauta pluginul frostnade. si aici ca sa dai la cineva vip cine are acces la flagul D/d atunci are vip tu poti sa stergi la toti din user.ini flagul d si sa iti ti numa tie astfel numa tu o sa ai vip :)

Code: Select all

 #include <amxmodx>
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "VIP Sistem"
#define VERSION "1.0"
#define AUTHOR "sDs|Aragon*"

#define VIP_LEVEL ADMIN_LEVEL_D
#pragma semicolon 1

static const COLOR[] = "^x04"; // Green for display VIP
new CvarHPBonus, CvarAPBonus;
new bool:killed[33];
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");
	CvarHPBonus = register_cvar("vip_hp_bonus", "15");
	CvarAPBonus = register_cvar("vip_ap_bonus", "15");
	RegisterHam(Ham_Killed, "player", "KilledPlayer");
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);
	register_message(get_user_msgid("ScoreAttrib"),"vip_scoreboard");
	}
public plugin_precache() {
	precache_model("models/player/vip/vip.mdl");
	precache_model("models/player/vip/vip.mdl");
	}
	
public KilledPlayer(victim, killer, shouldgib) {
	killed[killer] ++;
	}
	
public Spawn(id)
	if(get_user_flags(id) & VIP_LEVEL) {
	set_task(1.0,"GiveItems",id);	
	}
	
public GiveItems(id) {
	give_item(id, "weapon_hegrenade");
	give_item(id, "weapon_flashbang");
	give_item(id, "weapon_smokegrenade");
	cs_set_user_model(id, "vip");
	if(killed[id]) {
	ColorChat(id,"Ai primit %dHP si %dAP pentru uciderea inamicilor",(get_pcvar_num(CvarHPBonus) * killed[id]), (get_pcvar_num(CvarAPBonus) * killed[id]));
	set_task(0.1,"givehp",id,_,_,"b");
	}
	}
	
public givehp(id) {
	if(killed[id]) {
	killed[id]--;
	set_user_health(id, get_user_health(id) + get_pcvar_num(CvarHPBonus));
	set_user_armor(id, get_user_armor(id) + get_pcvar_num(CvarAPBonus));
	}
	else {
	remove_task(id);
	}
	}
	
public print_adminlist(user) {
	new adminnames[33][32];
	new message[256];
	new id, count, x, len;
	
	for(id = 1 ; id <= get_maxplayers() ; id++)
	if(is_user_connected(id))
	if(get_user_flags(id) & VIP_LEVEL)
	get_user_name(id, adminnames[count++], 31);

	len = format(message, 255, "%s VIP ONLINE: ",COLOR);
	if(count > 0) {
	for(x = 0 ; x < count ; x++) {
	len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
	if(len > 96) {
	print_message(user, message);
	len = format(message, 255, "%s ",COLOR);
	}
	}
	print_message(user, message);
	}
	else {
	len += format(message[len], 255-len, "No VIP online.");
	print_message(user, message);
	}
	}
	
print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
	}
	
public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
	set_task(0.1,"print_adminlist",id);
	return PLUGIN_CONTINUE;
	}
	
public vip_scoreboard(const MsgId, const MsgType, const MsgDest) {
	static id;
	id = get_msg_arg_int(1);
	if(get_user_flags(id) & VIP_LEVEL)
	set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
	}
	
stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
 
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^3");
 
	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(msg);
	message_end();
	}
	}
	} 
	}
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

18 Oct 2012, 18:31

D=amx_ban
Nu poti sa-mi pui tu T ? ca nu stiu unde :-/
Si merge ai si tu inca +1 multumesc si mai iti dau cand revin daca revin cu el din nou sa fie cu "t" sa nu fie "d" :|
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Soke
Membru, skill +1
Membru, skill +1
Posts: 248
Joined: 31 May 2012, 21:58
Detinator Steam: Da
CS Status: Umblu pe forum
Detinator server CS: Da
SteamID: MorenuRaulAndrei
Has thanked: 11 times
Been thanked: 16 times
Contact:

18 Oct 2012, 20:56

Poftim

Code: Select all

#include <amxmodx>
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "VIP Sistem"
#define VERSION "1.0"
#define AUTHOR "sDs|Aragon*"

#define VIP_LEVEL ADMIN_LEVEL_T
#pragma semicolon 1

static const COLOR[] = "^x04"; // Green for display VIP
new CvarHPBonus, CvarAPBonus;
new bool:killed[33];
public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR);
   register_clcmd("say", "handle_say");
   register_clcmd("say_team", "handle_say");
   CvarHPBonus = register_cvar("vip_hp_bonus", "15");
   CvarAPBonus = register_cvar("vip_ap_bonus", "15");
   RegisterHam(Ham_Killed, "player", "KilledPlayer");
   RegisterHam(Ham_Spawn, "player", "Spawn", 1);
   register_message(get_user_msgid("ScoreAttrib"),"vip_scoreboard");
   }
public plugin_precache() {
   precache_model("models/player/vip/vip.mdl");
   precache_model("models/player/vip/vip.mdl");
   }
   
public KilledPlayer(victim, killer, shouldgib) {
   killed[killer] ++;
   }
   
public Spawn(id)
   if(get_user_flags(id) & VIP_LEVEL) {
   set_task(1.0,"GiveItems",id);   
   }
   
public GiveItems(id) {
   give_item(id, "weapon_hegrenade");
   give_item(id, "weapon_flashbang");
   give_item(id, "weapon_smokegrenade");
   cs_set_user_model(id, "vip");
   if(killed[id]) {
   ColorChat(id,"Ai primit %dHP si %dAP pentru uciderea inamicilor",(get_pcvar_num(CvarHPBonus) * killed[id]), (get_pcvar_num(CvarAPBonus) * killed[id]));
   set_task(0.1,"givehp",id,_,_,"b");
   }
   }
   
public givehp(id) {
   if(killed[id]) {
   killed[id]--;
   set_user_health(id, get_user_health(id) + get_pcvar_num(CvarHPBonus));
   set_user_armor(id, get_user_armor(id) + get_pcvar_num(CvarAPBonus));
   }
   else {
   remove_task(id);
   }
   }
   
public print_adminlist(user) {
   new adminnames[33][32];
   new message[256];
   new id, count, x, len;
   
   for(id = 1 ; id <= get_maxplayers() ; id++)
   if(is_user_connected(id))
   if(get_user_flags(id) & VIP_LEVEL)
   get_user_name(id, adminnames[count++], 31);

   len = format(message, 255, "%s VIP ONLINE: ",COLOR);
   if(count > 0) {
   for(x = 0 ; x < count ; x++) {
   len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
   if(len > 96) {
   print_message(user, message);
   len = format(message, 255, "%s ",COLOR);
   }
   }
   print_message(user, message);
   }
   else {
   len += format(message[len], 255-len, "No VIP online.");
   print_message(user, message);
   }
   }
   
print_message(id, msg[]) {
   message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
   write_byte(id);
   write_string(msg);
   message_end();
   }
   
public handle_say(id) {
   new said[192];
   read_args(said,192);
   if(contain(said, "/vips") != -1)
   set_task(0.1,"print_adminlist",id);
   return PLUGIN_CONTINUE;
   }
   
public vip_scoreboard(const MsgId, const MsgType, const MsgDest) {
   static id;
   id = get_msg_arg_int(1);
   if(get_user_flags(id) & VIP_LEVEL)
   set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
   }
   
stock ColorChat(const id, const input[], any:...) {
   new count = 1, players[32];
   static msg[191];
   vformat(msg, 190, input, 3);

   replace_all(msg, 190, "!x04", "^4");
   replace_all(msg, 190, "!x01", "^1");
   replace_all(msg, 190, "!x03", "^3");

   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(msg);
   message_end();
   }
   }
   }
   }
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests