Cerere Plugin 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 .
geq
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 10 Aug 2013, 13:43
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

10 Aug 2013, 13:57

Buna Ziua.
As dori si eu un Plugin VIP care sa sa contina
30 Hp pentru Hs
400$ pentru Hs
15hp Pentru frag
200$ pentru frag
1he + 2Flash
Deagle
Armura 100
Daca puteti sa faceti si sa apara VIP in dreptul numelui cand apas TAB (nu e obligatoriu)
Sa beneficieze de BulletDamage

Multumesc!
RoyalServer 2
User avatar
oneeightone
Fost moderator
Fost moderator
Posts: 2547
Joined: 17 Jul 2009, 19:29
Detinator Steam: Da
Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3
Has thanked: 68 times
Been thanked: 521 times

10 Aug 2013, 15:07

Incearca:
| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

new g_HudSyncObj;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
}

public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
    set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_smokegrenade");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}
VIP-ul e setat pe flag-ul t [ADMIN_LEVEL_H]
Poti modifica aici:

Code: Select all

#define CUSTOM_FLAG ADMIN_LEVEL_H   
geq
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 10 Aug 2013, 13:43
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

10 Aug 2013, 18:00

Multumesc merge deocamdata. dar imi da smoke, nu HE
si vad ca nu are /vips si /wantvip
Poti sa modifici ?
Am incercat eu dar acum nu imi da nici deagle.
E bine cum am modificat? sau mai trebuie ceva
| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

new g_HudSyncObj;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
}

public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
    set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_hegren");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}
Last edited by geq on 10 Aug 2013, 18:06, edited 2 times in total.
User avatar
oneeightone
Fost moderator
Fost moderator
Posts: 2547
Joined: 17 Jul 2009, 19:29
Detinator Steam: Da
Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3
Has thanked: 68 times
Been thanked: 521 times

10 Aug 2013, 18:05

| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

new g_HudSyncObj;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
}

public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
    set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_hegrenade");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}
geq wrote:si vad ca nu are /vips si /wantvip
Nu vad nicaieri ca ai cerut asa ceva, daca vrei iti adaug.
geq
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 10 Aug 2013, 13:43
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

10 Aug 2013, 18:07

scuze am uitat
Daca poti
Te rog frumos.
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:

10 Aug 2013, 18:12

Fara '/wantvip' :
| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <engine>

#define PLUGIN "System VIP"
#define VERSION "1.1"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

new g_HudSyncObj;

new bool:g_bAdminNick
new bool:is_admin_connected[33]
new g_msg[512]

new g_admin_enable
new g_online_color
new g_offline_color
new g_msg_xypos

new g_SyncAdmin
new g_iAdminCount 
new g_iMaxPlayers

new g_ClassName[] = "admin_msg"

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("DeathMsg", "Event_DeathMsg", "a")
	RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
	register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
	register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
	register_think(g_ClassName,"ForwardThink")

        register_clcmd ("say /vreuvip" , "wantvip" , -1);
        register_clcmd ("say_team /vreauvip" , "wantvip" , -1);
	
	g_admin_enable = register_cvar("sa_plugin_on","1")
	g_online_color = register_cvar("sa_online_color","0 130 0")
	g_offline_color = register_cvar("sa_offline_color","255 0 0")
	g_msg_xypos = register_cvar("sa_msg_xypos","0.02 0.2")
	
	g_SyncAdmin = CreateHudSyncObj()
	g_iMaxPlayers = get_maxplayers()
	
	new iEnt = create_entity("info_target")
	entity_set_string(iEnt, EV_SZ_classname, g_ClassName)
	entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public wantvip(id)
{
            show_motd(id,"/addons/amxmodx/configs/vip.html")
}
public client_putinserver(id)
{
	if(get_user_flags(id) & CUSTOM_FLAG)
	{
		is_admin_connected[id] = true
		g_iAdminCount++
		set_admin_msg()
	}
	if(g_iAdminCount == 0)
		set_admin_msg()
}

public client_disconnect(id)
{
	if(is_admin_connected[id])
	{
		is_admin_connected[id] = false
		g_iAdminCount--
		set_admin_msg()
	}
}

public client_infochanged(id)
{
	if(is_admin_connected[id])
	{
		static NewName[32], OldName[32]
		get_user_info(id, "name", NewName, 31)
		get_user_name(id, OldName, 31)
		
		if(!equal(OldName, NewName))
		{
			g_bAdminNick = true
		}
	}
}

public set_admin_msg()
{
	static g_iAdminName[32], pos, i
	pos = 0
	pos += formatex(g_msg[pos], 511-pos, "VIP's Online: %d", g_iAdminCount)
	
	for(i = 1 ; i <= g_iMaxPlayers ; i++)
	{	
		if(is_admin_connected)
		{
			get_user_name(i, g_iAdminName, 31)
			pos += formatex(g_msg[pos], 511-pos, "^n%s", g_iAdminName)
		}
	}
}

public admins_online() 
{
	if(get_pcvar_num(g_admin_enable))
	{
		static r, g, b, Float:x,Float:y
		HudMsgPos(x,y)
		
		if (g_iAdminCount > 0)
		{
			HudMsgColor(g_online_color, r, g, b)
			set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
			ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
		}
		else
		{
			HudMsgColor(g_offline_color, r, g, b)
			set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
			ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
		}
	}
	return PLUGIN_HANDLED
} 

public ForwardThink(iEnt)
{
	admins_online()
	
	if(g_bAdminNick)
	{
		set_admin_msg()
		g_bAdminNick = false
	}
	entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public HudMsgColor(cvar, &r, &g, &b)
{
	static color[16], piece[5]
	get_pcvar_string(cvar, color, 15)
	
	strbreak( color, piece, 4, color, 15)
	r = str_to_num(piece)
	
	strbreak( color, piece, 4, color, 15)
	g = str_to_num(piece)
	b = str_to_num(color)
}

public HudMsgPos(&Float:x, &Float:y)
{
	static coords[16], piece[10]
	get_pcvar_string(g_msg_xypos, coords, 15)
	
	strbreak(coords, piece, 9, coords, 15)
	x = str_to_float(piece)
	y = str_to_float(coords)
}

public Event_DeathMsg()
{
	new iKiller = read_data(1)
	new iHeadShot = read_data(3)
	
	if(get_user_flags(iKiller) & CUSTOM_FLAG)
	{
		{
			cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
			set_user_health(iKiller, get_user_health(iKiller) + 15)
		}

		if(iHeadShot)
		{	
			{
			cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
			set_user_health(iKiller, get_user_health(iKiller) + 30)
			}
		}
	}
}

public FwdHamPlayerSpawn( const id )
{
	if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
	set_user_armor(id, 100);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	give_item(id, "weapon_flashbang");		// FB
	give_item(id, "weapon_flashbang");		// FB
	give_item(id, "weapon_smokegrenade");		// SG
	give_item(id, "weapon_hegrenade");		// HE
	set_user_armor(id, 100);
	give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
static id; 
id = get_msg_arg_int( 1 ); 

if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
	set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
	g_HudSyncObj = CreateHudSyncObj();

public Damage(Cl)
{
	static Attacker;
	Attacker = get_user_attacker(Cl);
	
	if (get_user_flags(Attacker) & CUSTOM_FLAG)
	{
		set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
		ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
	}
}


VIP-ii Online ii vei vedea in HUD sub radar fara a mai scrie '/vips' .


Am adugat si WANT VIP. Mersi oneeightone pentru ajutor.
Last edited by YONTU on 10 Aug 2013, 18:23, edited 1 time in total.
„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
oneeightone
Fost moderator
Fost moderator
Posts: 2547
Joined: 17 Jul 2009, 19:29
Detinator Steam: Da
Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3
Has thanked: 68 times
Been thanked: 521 times

10 Aug 2013, 18:18

| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

static const COLOR[] = "^x04"

new g_HudSyncObj;
new maxplayers;
new gmsgSayText;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
    register_clcmd ("say /wantvip" , "wantvip" , -1);
}
   
public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public wantvip(id) show_motd(id,"/addons/amxmodx/configs/wantvip.html");

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
    set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_hegrenade");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}

public handle_say(id)
{
	new said[192]
	read_args(said,192)
	if(( containi(said, "/vips") != -1 && containi(said, "vips") != -1) || contain(said, "/vips") != -1)
		set_task(0.1,"print_viplist", id)
	return PLUGIN_CONTINUE
}

public print_viplist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
			if(get_user_flags(id) & CUSTOM_FLAG)
				get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "%s Online VIP: ",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 online VIP.")
		print_message(user, message)
	}

}

print_message(id, msg[])
{
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
Creezi un fisier wantvip.html pe care il pui in configs.(Acolo vei pune informatiile)
geq
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 10 Aug 2013, 13:43
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

10 Aug 2013, 18:23

oneeightone wrote:
| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

static const COLOR[] = "^x04"

new g_HudSyncObj;
new maxplayers;
new gmsgSayText;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
    register_clcmd ("say /wantvip" , "wantvip" , -1);
}
   
public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public wantvip(id) show_motd(id,"/addons/amxmodx/configs/wantvip.html");

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
    set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_hegrenade");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}

public handle_say(id)
{
	new said[192]
	read_args(said,192)
	if(( containi(said, "/vips") != -1 && containi(said, "vips") != -1) || contain(said, "/vips") != -1)
		set_task(0.1,"print_viplist", id)
	return PLUGIN_CONTINUE
}

public print_viplist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
			if(get_user_flags(id) & CUSTOM_FLAG)
				get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "%s Online VIP: ",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 online VIP.")
		print_message(user, message)
	}

}

print_message(id, msg[])
{
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
Creezi un fisier wantvip.html pe care il pui in configs.(Acolo vei pune informatiile)
Am inteles. dar nu merge /Vips
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:

10 Aug 2013, 18:26

| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <engine>

#define PLUGIN "System VIP"
#define VERSION "1.1"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

new g_HudSyncObj;

new bool:g_bAdminNick
new bool:is_admin_connected[33]
new g_msg[512]

new g_admin_enable
new g_online_color
new g_offline_color
new g_msg_xypos

new g_SyncAdmin
new g_iAdminCount 
new g_iMaxPlayers

new g_ClassName[] = "admin_msg"

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("DeathMsg", "Event_DeathMsg", "a")
	RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
	register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
	register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
	register_think(g_ClassName,"ForwardThink")

        register_clcmd ("say /vreuvip" , "wantvip" , -1);
        register_clcmd ("say_team /vreauvip" , "wantvip" , -1);
	
	g_admin_enable = register_cvar("sa_plugin_on","1")
	g_online_color = register_cvar("sa_online_color","0 130 0")
	g_offline_color = register_cvar("sa_offline_color","255 0 0")
	g_msg_xypos = register_cvar("sa_msg_xypos","0.02 0.2")
	
	g_SyncAdmin = CreateHudSyncObj()
	g_iMaxPlayers = get_maxplayers()
	
	new iEnt = create_entity("info_target")
	entity_set_string(iEnt, EV_SZ_classname, g_ClassName)
	entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public wantvip(id)
{
            show_motd(id,"/addons/amxmodx/configs/vip.html")
}
public client_putinserver(id)
{
	if(get_user_flags(id) & CUSTOM_FLAG)
	{
		is_admin_connected[id] = true
		g_iAdminCount++
		set_admin_msg()
	}
	if(g_iAdminCount == 0)
		set_admin_msg()
}

public client_disconnect(id)
{
	if(is_admin_connected[id])
	{
		is_admin_connected[id] = false
		g_iAdminCount--
		set_admin_msg()
	}
}

public client_infochanged(id)
{
	if(is_admin_connected[id])
	{
		static NewName[32], OldName[32]
		get_user_info(id, "name", NewName, 31)
		get_user_name(id, OldName, 31)
		
		if(!equal(OldName, NewName))
		{
			g_bAdminNick = true
		}
	}
}

public set_admin_msg()
{
	static g_iAdminName[32], pos, i
	pos = 0
	pos += formatex(g_msg[pos], 511-pos, "VIP's Online: %d", g_iAdminCount)
	
	for(i = 1 ; i <= g_iMaxPlayers ; i++)
	{	
		if(is_admin_connected)
		{
			get_user_name(i, g_iAdminName, 31)
			pos += formatex(g_msg[pos], 511-pos, "^n%s", g_iAdminName)
		}
	}
}

public admins_online() 
{
	if(get_pcvar_num(g_admin_enable))
	{
		static r, g, b, Float:x,Float:y
		HudMsgPos(x,y)
		
		if (g_iAdminCount > 0)
		{
			HudMsgColor(g_online_color, r, g, b)
			set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
			ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
		}
		else
		{
			HudMsgColor(g_offline_color, r, g, b)
			set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
			ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
		}
	}
	return PLUGIN_HANDLED
} 

public ForwardThink(iEnt)
{
	admins_online()
	
	if(g_bAdminNick)
	{
		set_admin_msg()
		g_bAdminNick = false
	}
	entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public HudMsgColor(cvar, &r, &g, &b)
{
	static color[16], piece[5]
	get_pcvar_string(cvar, color, 15)
	
	strbreak( color, piece, 4, color, 15)
	r = str_to_num(piece)
	
	strbreak( color, piece, 4, color, 15)
	g = str_to_num(piece)
	b = str_to_num(color)
}

public HudMsgPos(&Float:x, &Float:y)
{
	static coords[16], piece[10]
	get_pcvar_string(g_msg_xypos, coords, 15)
	
	strbreak(coords, piece, 9, coords, 15)
	x = str_to_float(piece)
	y = str_to_float(coords)
}

public Event_DeathMsg()
{
	new iKiller = read_data(1)
	new iHeadShot = read_data(3)
	
	if(get_user_flags(iKiller) & CUSTOM_FLAG)
	{
		{
			cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
			set_user_health(iKiller, get_user_health(iKiller) + 15)
		}

		if(iHeadShot)
		{	
			{
			cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
			set_user_health(iKiller, get_user_health(iKiller) + 30)
			}
		}
	}
}

public FwdHamPlayerSpawn( const id )
{
	if(is_user_alive( id ) && get_user_flags( id ) & CUSTOM_FLAG)
	set_user_armor(id, 100);
	cs_set_user_bpammo(id, CSW_DEAGLE, 35);
	give_item(id, "weapon_flashbang");		// FB
	give_item(id, "weapon_flashbang");		// FB
	give_item(id, "weapon_smokegrenade");		// SG
	give_item(id, "weapon_hegrenade");		// HE
	set_user_armor(id, 100);
	give_item(id,"weapon_deagle");
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
static id; 
id = get_msg_arg_int( 1 ); 

if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
	set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
	g_HudSyncObj = CreateHudSyncObj();

public Damage(Cl)
{
	static Attacker;
	Attacker = get_user_attacker(Cl);
	
	if (get_user_flags(Attacker) & CUSTOM_FLAG)
	{
		set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
		ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
	}
}


Tot ce ai cerut. VIP-iii ii vei vedea in HUD sub radar + comanda /wantvip
„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
oneeightone
Fost moderator
Fost moderator
Posts: 2547
Joined: 17 Jul 2009, 19:29
Detinator Steam: Da
Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3
Has thanked: 68 times
Been thanked: 521 times

10 Aug 2013, 18:29

| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

static const COLOR[] = "^x04"

new g_HudSyncObj;
new maxplayers;
new gmsgSayText;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
    register_clcmd ("say /wantvip" , "wantvip" , -1);
    maxplayers = get_maxplayers()
    gmsgSayText = get_user_msgid("SayText") 
    register_clcmd("say", "handle_say")
}
   
public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public wantvip(id) show_motd(id,"/addons/amxmodx/configs/wantvip.html");

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id ) == CUSTOM_FLAG)
   {set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_hegrenade");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}

public handle_say(id) {
	new said[192]
	read_args(said,192)
	if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
		set_task(0.1,"print_adminlist",id)
	return PLUGIN_CONTINUE
}

public print_adminlist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
			if(get_user_flags(id) & ADMIN_LEVEL_H)
				get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "%s VIPI 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, "Nu sunt VIPI online.")
		print_message(user, message)
	}
	
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
geq
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 10 Aug 2013, 13:43
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 3 times
Contact:

10 Aug 2013, 19:46

oneeightone al tau merge /vips si /wantvip dar acum nu imi da deagle si grenazile.
YONTU al tau imi da armele si grenazile dar le da tuturor jucatorilor. chiar daca nu sunt VIP.
Daca se poate face ceva sa imi spuneti. sa nu va mai stresez atat.
User avatar
oneeightone
Fost moderator
Fost moderator
Posts: 2547
Joined: 17 Jul 2009, 19:29
Detinator Steam: Da
Reputatie: Fost super moderator
Membru Club eXtreamCS (o luna)
Nick anterior : LiGHTERS
0.3 / 3
Has thanked: 68 times
Been thanked: 521 times

10 Aug 2013, 19:54

| Afiseaza codul
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "AMXX"

#define CUSTOM_FLAG ADMIN_LEVEL_H 

static const COLOR[] = "^x04"

new g_HudSyncObj;
new maxplayers;
new gmsgSayText;

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("DeathMsg", "Event_DeathMsg", "a")
    RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
    register_message( get_user_msgid( "ScoreAttrib" ),    "msgScoreAttrib" );
    register_event("Damage", "Damage", "b", "2!0", "3=0", "4!0");
    register_clcmd ("say /wantvip" , "wantvip" , -1);
    maxplayers = get_maxplayers()
    gmsgSayText = get_user_msgid("SayText") 
    register_clcmd("say", "handle_say")
}
   
public Event_DeathMsg()
{
    new iKiller = read_data(1)
    new iHeadShot = read_data(3)
    
    if(get_user_flags(iKiller) & CUSTOM_FLAG)
    {
        {
            cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 200)
            set_user_health(iKiller, get_user_health(iKiller) + 15)
        }
        if(iHeadShot)
        {
           
            {
             cs_set_user_money(iKiller, cs_get_user_money(iKiller) + 400)
             set_user_health(iKiller, get_user_health(iKiller) + 30)
            }
        }
    }
}

public wantvip(id) show_motd(id,"/addons/amxmodx/configs/wantvip.html");

public FwdHamPlayerSpawn( const id ) {
    
    if(is_user_alive( id ) && get_user_flags( id )& ADMIN_LEVEL_H)
   {set_user_armor(id, 100);
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_flashbang");
    give_item(id, "weapon_hegrenade");
    set_user_armor(id, 100);
    give_item(id,"weapon_deagle");
}
}

public msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) { 
    static id; 
    id = get_msg_arg_int( 1 ); 
     
    if( ( get_user_flags( id ) & CUSTOM_FLAG ) && ( get_user_team( id ) == 2 ) && !get_msg_arg_int( 2 )) 
        set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) ); 
}  

public plugin_cfg()
        g_HudSyncObj = CreateHudSyncObj();
 
public Damage(Cl)
{
        static Attacker;
        Attacker = get_user_attacker(Cl);
 
        if (get_user_flags(Attacker) & CUSTOM_FLAG)
        {
                set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, 7);
                ShowSyncHudMsg(Attacker, g_HudSyncObj, "%d^n", read_data(2));
        }
}

public handle_say(id) {
	new said[192]
	read_args(said,192)
	if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
		set_task(0.1,"print_adminlist",id)
	return PLUGIN_CONTINUE
}

public print_adminlist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
			if(get_user_flags(id) & ADMIN_LEVEL_H)
				get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "%s VIPI 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, "Nu sunt VIPI online.")
		print_message(user, message)
	}
	
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests