plugin vip simplu

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 .
Post Reply
User avatar
BiLLy
Membru, skill +2
Membru, skill +2
Posts: 914
Joined: 20 May 2010, 19:33
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Reputatie: Membru Club eXtreamCS (2 luni)
Restrictie PM (scoasa)
Has thanked: 62 times
Been thanked: 29 times

20 Jan 2014, 11:44

pentru fiecare kill +10HP si pentru fiecare HS +15HP
-VIP-urile sa aiba slot
-sa apara VIP la scoreboard
-cand cineva scrie /vips sa arate vipii online .

si un plugin parachute sa dea parasuta la toti playerii de pe server . gratis .

pentru clasic

Multumesc .
RoyalServer
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

20 Jan 2014, 14:22

Iti fac eu pluginul pentru Vip mai tarziu ca.s pe tell acum.
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 766
Joined: 11 Oct 2013, 11:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Fost moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 44 times
Been thanked: 122 times

20 Jan 2014, 14:58

Poftim:
Parasuta | Afiseaza codul
http://www.extreamcs.com/forum/amxmodx/ ... 01635.html
VIP System | Afiseaza codul
/* Plugin generated by AMXX-Studio */

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

#pragma tabsize 0

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"

#define ADMIN_VIP ADMIN_LEVEL_H

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP  ( 1 << 2 )


new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	health_add = register_cvar("amx_vip_hp", "15")
	health_hs_add = register_cvar("amx_vip_hp_hs", "30")
	health_max = register_cvar("amx_vip_max_hp", "100")
	
	register_event("DeathMsg", "hook_death", "a", "1>0")
	
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");
	
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	// Add your code here...
}

//-- | VIP Kill & HS = HP | --//
public hook_death()
{
   // Killer id
   nKiller = read_data(1)
   
   if ( (read_data(3) == 1) && (read_data(5) == 0) )
   {
      nHp_add = get_pcvar_num (health_hs_add)
   }
   else
      nHp_add = get_pcvar_num (health_add)
   nHp_max = get_pcvar_num (health_max)
   // Updating Killer HP
   if(!(get_user_flags(nKiller) & ADMIN_VIP))
   return;

   nKiller_hp = get_user_health(nKiller)
   nKiller_hp += nHp_add
   // Maximum HP check
   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
   set_user_health(nKiller, nKiller_hp)
   // Hud message "Healed +15/+30 hp"
   set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
   show_hudmessage(nKiller, "Healed +%d hp", nHp_add)
   // Screen fading
   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   write_short(1<<10)
   write_short(1<<10)
   write_short(0x0000)
   write_byte(0)
   write_byte(0)
   write_byte(200)
   write_byte(75)
   message_end()
 
}

//-- | ScoreBoard VIP | --// 
public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
    new iPlayer = get_msg_arg_int( 1 );
    if( is_user_connected( iPlayer )
    && ( get_user_flags( iPlayer ) & ADMIN_VIP ) ) {
        set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
    }
}

//-- | VIP Online | --//
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) & ADMIN_VIP)
      get_user_name(id, adminnames[count++], 31);
   
   len = format(message, 255, "^x04 VIP ONLINE: ");
   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, "^x04 ");
         }
      }
      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;
}
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

21 Jan 2014, 14:14

plugin_vip.sma | Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >

#pragma semicolon 1

#define PLUGIN_NAME	"Very Very Simple VIP System"
#define PLUGIN_VERSION	"1.0"

#define VIP_ACCESS ADMIN_IMMUNITY	// Acces-ul VIP-ului

static const COLORG[  ] = "^x04";
static const COLORD[  ] = "^x01";
static const COLORT[  ] = "^x03";

new g_iMaxPlayers, g_MsgSayText;

enum {
    	SCOREATTRIB_ARG_PLAYERID = 1,
    	SCOREATTRIB_ARG_FLAGS
};

enum ( <<= 1 ) {

    	SCOREATTRIB_FLAG_NONE = 0,
    	SCOREATTRIB_FLAG_DEAD = 1,
    	SCOREATTRIB_FLAG_BOMB,
    	SCOREATTRIB_FLAG_VIP
};

new g_cvar_money_ct,
	g_cvar_money_t,
	g_cvar_reserve_slot,
	g_cvar_vip_scoreboard;

public plugin_init( )
{
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "YONTU" );
	
	register_event( "DeathMsg", "event_DeathMsg", "ae" );

	g_iMaxPlayers = get_maxplayers( );
	g_MsgSayText = get_user_msgid( "SayText" );

	g_cvar_money_ct = register_cvar( "vip_money_ct", "3000" );
	g_cvar_money_t = register_cvar( "vip_money_t", "4000" );
	g_cvar_reserve_slot = register_cvar( "vip_reserve_slot", "1" );
	g_cvar_vip_scoreboard = register_cvar( "vip_scoreboard", "1" );

	register_clcmd( "say", "handle_say" );
	register_clcmd( "say_team", "handle_say" );
}

public client_putinserver( id )
	if( get_pcvar_num( g_cvar_reserve_slot ) > 0)
		CheckAccess( id );

public event_DeathMsg(  ) {

	new iAttacker = read_data( 1 );
	new iVictim = read_data( 2 );
	
	if( !iAttacker || !iVictim )
		return;
	
	if( is_user_vip( iAttacker ) ) {

		if( iAttacker && is_user_alive( iAttacker ) ) {

			if( is_user_tero( iVictim ) )
				if( cs_get_user_money( iAttacker ) < 16000 - get_pcvar_num( g_cvar_money_t ) )
					cs_set_user_money( iAttacker, cs_get_user_money( iAttacker ) + get_pcvar_num( g_cvar_money_t ) );
			
			if( is_user_ct( iVictim ) )
				if( cs_get_user_money( iAttacker ) < 16000 - get_pcvar_num( g_cvar_money_ct ) )
					cs_set_user_money( iAttacker, cs_get_user_money( iAttacker ) + get_pcvar_num( g_cvar_money_ct ) );
		}
	}
}

public MessageScoreAttrib( iMsgId, iDest, iReceiver ) {

    	if( get_pcvar_num( g_cvar_vip_scoreboard ) > 0 ) {

        		new iPlayer = get_msg_arg_int( SCOREATTRIB_ARG_PLAYERID );
        
        		if( access( iPlayer, VIP_ACCESS ) )
           		set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP );
    	}
}

public handle_say( id ) {

	new szSaid[ 192 ];
	read_args( szSaid, 192 );

	if( ( containi( szSaid, "vips" ) != -1 && containi( szSaid, "vips" ) != -1 ) || contain( szSaid, "/vips" ) != -1 )
		set_task( 0.1, "task_PrintVipList", id );

	return PLUGIN_CONTINUE;
}

public task_PrintVipList( user ) {

	new szAdminNames[ 33 ][ 32 ];
	new szMessage[ 256 ];
	new iCount, iLen;
	
	for( new id = 1 ; id <= g_iMaxPlayers ; id++ )
		if( is_user_connected( id ) )
			if( is_user_vip( id ) )
				get_user_name( id, szAdminNames[ iCount++ ], 31 );

	iLen = format( szMessage, 255, "%s VIP's Online: ", COLORG );

	if( iCount > 0 ) {

		for( new i = 0 ; i < iCount ; i++ ) {

			iLen += format( szMessage[ iLen ], 255 - iLen, "^x03%s%s", szAdminNames[ i ], i < ( iCount - 1 ) ? ", ":"", COLORT );

			if( iLen > 96 ) {

				print_message( user, szMessage );
				iLen = format( szMessage, 255, "%s ", COLORG );
			}
		}

		print_message( user, szMessage );
	}

	else {

		iLen += format( szMessage[ iLen ], 255 - iLen, "^x01Nu sunt VIP-i online.", COLORD );
		print_message( user, szMessage );
	}
}

print_message( id, msg[  ] ) {

	message_begin( MSG_ONE, g_MsgSayText, { 0, 0, 0 }, id );
	write_byte( id );
	write_string( msg );
	message_end(  );
}

public CheckAccess( id ) {

	new szPlayers = get_playersnum( 1 );
	new iLimit = g_iMaxPlayers - get_pcvar_num( g_cvar_reserve_slot );
	
	if( is_user_vip( id ) || ( szPlayers <= iLimit ) )
		return PLUGIN_CONTINUE;
	
	server_cmd( "kick #%d ^"Dropped due to slot reservation^"", get_user_userid( id ) );

	return PLUGIN_HANDLED;
}

stock bool:is_user_vip( id ) {

	if( get_user_flags( id ) & VIP_ACCESS )
		return true;
	
	return false;
}

stock is_user_ct( id ) {

	if( is_user_connected( id ) && !is_user_bot( id ) && cs_get_user_team( id ) == CS_TEAM_CT )
		return 1;
	
	return 0;
}

stock is_user_tero( id ) {

	if( is_user_connected( id ) && !is_user_bot( id ) && cs_get_user_team( id ) == CS_TEAM_T )
		return 1;
	
	return 0;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Code: Select all

vip_money_ct "3000" - daca vip-u' este CT cati bani sa primeasca pe kill
vip_money_t "4000" - daca vip-u' este TERO cati bani sa primeasca pe kill
vip_reserve_slot "1" - Activeaza / Dezactiveaza rezervarea VIP-ului pe servre
vip_scoreboard "1" - Activeaza / Dezactiveaza VIP-ul in TAB
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
Post Reply

Return to “Cereri”

  • Information