vip dr

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
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

23 Nov 2013, 22:11

puteti face un vip cu un meniu si sa apara in tabscore
meniu sa aiba
viteza 1300(sa mearga si cand schimbi arma)
viteza 250(sa mearga si cand schimbi arma)
gravity 500
si sa fie aplicat de cate ori e nevoie cu /vipmenu, iar daca esti mort sa zica ca poti folosi meniul doar cand esti in viata
am nevoie mare de el :D
Image
Image
Rapidserver
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

23 Nov 2013, 23:09

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

#define PLUGIN "DrVip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_VIP	ADMIN_KICK

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

new g_Speed[33], bool:g_Grav[33]

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipmenu","cmdVip");
	register_logevent("roundstart", 2, "1=Round_Start");
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public cmdVip ( id )
{
	if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
	{
		if(is_user_alive(id))
		{
			cmdMenu( id )
		}
		else
		{
			Chat_Color(id,"!gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ")
		}
	}
}
public roundstart( )
{
	new iPlayers[ 32 ], iNum;
	
	get_players( iPlayers, iNum, "c" );
	
	for( new i = 0; i < iNum; i++ )
	{
		g_Speed[ iPlayers[ i ] ] = false
		set_user_maxspeed(iPlayers,400.0)
		
		g_Grav[ iPlayers[ i ] ] = false;
		set_user_gravity(iPlayers,1.0)
	}
}


public cmdMenu ( id )
{	
	static menu;
	menu = menu_create ("\ Meniu vip","meniu_vip");
	
	menu_additem ( menu,"\ Viteza[1300]","1", 0 );
	menu_additem ( menu,"\ Viteza[250]","2", 0 );
	menu_additem ( menu,"\ Gravity","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public meniu_vip ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	
	menu_item_getinfo ( menu, item, access, data, charsmax ( data ), szName, charsmax ( szName ), callback );
	
	new key = str_to_num ( data );
	
	switch ( key )
	{
		case 1:
		{
			g_Speed[id] = true;
			set_user_maxspeed(id, 1300.0)
			Chat_Color(id, "!gTi-ai ales !team1300 viteza")
		}
		case 2:
		{
			g_Speed[id] = true
			set_user_maxspeed(id, 250.0)
			Chat_Color(id, "!gTi-ai ales !team250 viteza")
		}
		case 3:
		{
			g_Grav[id] = true
			set_user_gravity(id, 0.6)
			Chat_Color(id, "!gTi-ai ales !team500 gravitatie")
		}
	}
	menu_destroy ( menu );
	return 1;
} 

public event_curweapon( id )
{
		if(g_Speed[id])
		{
			set_user_maxspeed(id, 1300.0)
		
		}else{
			set_user_maxspeed(id, 250.0)
		}
		
		if(g_Grav[id])
		{
			set_user_gravity(id, 0.6)
		}
}

public Message_ScoreAttrib( iMsgID, iDest, iReceiver )
{
	new iPlayer = get_msg_arg_int( 1 )
	if(get_user_flags( iPlayer) & ADMIN_VIP && is_user_connected( iPlayer ) )
		set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD )
}

stock Chat_Color(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4")
    replace_all(msg, 190, "!y", "^1")
    replace_all(msg, 190, "!team", "^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();
            }
        }
    }
}
public client_putinserver( id )
		g_Speed[id] = false

public client_disconnect( id ) 
		g_Speed[id] = false


L-am si colorat.. testeaza-l
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

24 Nov 2013, 13:44

poti sa ii pui si un tag ?:D
din sursa e ok, il testez imediat
Image
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

24 Nov 2013, 13:45

Ce fel de tag ??

EDIT1: Daca vrei iti fac sa poata sa foloseasca odata pe runda,iti zic si de ce,atunci cand alege de mai multe ori se poate creea bug de exemplu la viteza !
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

24 Nov 2013, 21:27

adica cand alegi speed/gravitatie exemplu sa zica
[VipMenu] Ti-ai ales 1000 speed.
[VipMenu] Ti-ai ales 500 gravity.
daca intelegi :D
Image
Image
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 3806
Joined: 22 Sep 2009, 12:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 305 times
Been thanked: 320 times
Contact:

24 Nov 2013, 21:46

Code: Select all

new szTag[] = "[TAG]"; 
- In loc de [TAG] pui ce vrei tu !

Code: Select all

#include <amxmodx>
#include <fun>

#define PLUGIN "DrVip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_VIP    ADMIN_KICK

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

new g_Speed[33], bool:g_Grav[33]

new szTag[] = "[TAG]";

public plugin_init () {
    
    register_plugin ("PLUGIN", "VERSION", "AUTHOR");
    register_clcmd ("say /vipmenu","cmdVip");
    register_logevent("roundstart", 2, "1=Round_Start");
    register_event("CurWeapon", "event_curweapon", "be", "1=1")
    register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public cmdVip ( id )
{
    if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
    {
        if(is_user_alive(id))
        {
            cmdMenu( id )
        }
        else
        {
            Chat_Color(id,"!team%s !gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ", szTag)
        }
    }
}
public roundstart( )
{
    new iPlayers[ 32 ], iNum;
    
    get_players( iPlayers, iNum, "c" );
    
    for( new i = 0; i < iNum; i++ )
    {
        g_Speed[ iPlayers[ i ] ] = false
        set_user_maxspeed(iPlayers[i],400.0)
        
        g_Grav[ iPlayers[ i ] ] = false;
        set_user_gravity(iPlayers[i],1.0)
    }
}


public cmdMenu ( id )
{    
    static menu;
    menu = menu_create ("\ Meniu vip","meniu_vip");
    
    menu_additem ( menu,"\ Viteza[1300]","1", 0 );
    menu_additem ( menu,"\ Viteza[250]","2", 0 );
    menu_additem ( menu,"\ Gravity","3", 0 );
    
    menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
    menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
    
    menu_display ( id, menu, 0 );
    return 0;
}

public meniu_vip ( id, menu, item )
{
    if ( item == MENU_EXIT )
    {
        menu_destroy ( menu );
        return 1;
    }
    
    new data [ 6 ], szName [ 64 ];
    new access, callback;
    
    menu_item_getinfo ( menu, item, access, data, charsmax ( data ), szName, charsmax ( szName ), callback );
    
    new key = str_to_num ( data );
    
    switch ( key )
    {
        case 1:
        {
            g_Speed[id] = true;
            set_user_maxspeed(id, 1300.0)
            Chat_Color(id, "!team%s !gTi-ai ales !team1300 viteza", szTag)
        }
        case 2:
        {
            g_Speed[id] = true
            set_user_maxspeed(id, 250.0)
            Chat_Color(id, "!team%s !gTi-ai ales !team250 viteza", szTag)
        }
        case 3:
        {
            g_Grav[id] = true
            set_user_gravity(id, 0.6)
            Chat_Color(id, "!teamm%s !gTi-ai ales !team500 gravitatie", szTag)
        }
    }
    menu_destroy ( menu );
    return 1;
} 

public event_curweapon( id )
{
        if(g_Speed[id])
        {
            set_user_maxspeed(id, 1300.0)
        
        }else{
            set_user_maxspeed(id, 250.0)
        }
        
        if(g_Grav[id])
        {
            set_user_gravity(id, 0.6)
        }
}

public Message_ScoreAttrib( iMsgID, iDest, iReceiver )
{
    new iPlayer = get_msg_arg_int( 1 )
    if(get_user_flags( iPlayer) & ADMIN_VIP && is_user_connected( iPlayer ) )
        set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD )
}

stock Chat_Color(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4")
    replace_all(msg, 190, "!y", "^1")
    replace_all(msg, 190, "!team", "^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();
            }
        }
    }
}
public client_putinserver( id )
        g_Speed[id] = false

public client_disconnect( id ) 
        g_Speed[id] = false

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

25 Nov 2013, 15:22

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

#define PLUGIN "DrVip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_VIP	ADMIN_KICK

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

new g_Speed[33], bool:g_Grav[33]

new const Tag[] = "!y[!gVIP!y]"

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipmenu","cmdVip");
	register_logevent("roundstart", 2, "1=Round_Start");
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public cmdVip ( id )
{
	if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
	{
		if(is_user_alive(id))
		{
			cmdMenu( id )
		}
		else
		{
			Chat_Color(id,"!gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ")
		}
	}
}
public roundstart( )
{
	new iPlayers[ 32 ], iNum;
	
	get_players( iPlayers, iNum, "c" );
	
	for( new i = 0; i < iNum; i++ )
	{
		g_Speed[ iPlayers[ i ] ] = false
		set_user_maxspeed(iPlayers,400.0)
		
		g_Grav[ iPlayers[ i ] ] = false;
		set_user_gravity(iPlayers,1.0)
	}
}


public cmdMenu ( id )
{	
	static menu;
	menu = menu_create ("\ Meniu vip","meniu_vip");
	
	menu_additem ( menu,"\ Viteza[1300]","1", 0 );
	menu_additem ( menu,"\ Viteza[250]","2", 0 );
	menu_additem ( menu,"\ Gravity","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public meniu_vip ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	
	menu_item_getinfo ( menu, item, access, data, charsmax ( data ), szName, charsmax ( szName ), callback );
	
	new key = str_to_num ( data );
	
	switch ( key )
	{
		case 1:
		{
			g_Speed[id] = true;
			set_user_maxspeed(id, 1300.0)
			Chat_Color(id, "%sTi-ai ales !team1300 viteza",Tag)
		}
		case 2:
		{
			g_Speed[id] = true
			set_user_maxspeed(id, 250.0)
			Chat_Color(id, "%sTi-ai ales !team250 viteza",Tag)
		}
		case 3:
		{
			g_Grav[id] = true
			set_user_gravity(id, 0.6)
			Chat_Color(id, "%sTi-ai ales !team500 gravitatie",Tag)
		}
	}
	menu_destroy ( menu );
	return 1;
} 

public event_curweapon( id )
{
	if(g_Speed[id])
	{
		set_user_maxspeed(id, 1300.0)
		
		}else{
		set_user_maxspeed(id, 250.0)
	}
	
	if(g_Grav[id])
	{
		set_user_gravity(id, 0.6)
	}
}

public Message_ScoreAttrib( iMsgID, iDest, iReceiver )
{
	new iPlayer = get_msg_arg_int( 1 )
	if(get_user_flags( iPlayer) & ADMIN_VIP && is_user_connected( iPlayer ) )
		set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD )
}

stock Chat_Color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!team", "^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();
		}
	}
}
}
public client_putinserver( id )
	g_Speed[id] = false

public client_disconnect( id ) 
	g_Speed[id] = false
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

25 Nov 2013, 20:51

se compileaza, e ok
dar vreau daca se poate cand aleg 250 viteza sa ramana 250, adica sa fie tot 250 cand schimb arma
daca aleg 1300 e ok, merge si cand schimb arma
dar daca aleg 250 merge, dar cand schimb arma se duce tot la 1300
Image
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

26 Nov 2013, 14:38

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

#define PLUGIN "DrVip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_VIP	ADMIN_KICK

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

new g_Speed[33], bool:g_Grav[33], bool:g_Speed2[33]

new const Tag[] = "!y[!gVIP!y]"

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipmenu","cmdVip");
	register_logevent("roundstart", 2, "1=Round_Start");
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public cmdVip ( id )
{
	if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
	{
		if(is_user_alive(id))
		{
			cmdMenu( id )
		}
		else
		{
			Chat_Color(id,"!gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ")
		}
	}
}
public roundstart( )
{
	new iPlayers[ 32 ], iNum;
	
	get_players( iPlayers, iNum, "c" );
	
	for( new i = 0; i < iNum; i++ )
	{
		g_Speed[ iPlayers[ i ] ] = false
		g_Speed2[ iPlayers [ i ] ] = false
		set_user_maxspeed(iPlayers,400.0)
		
		g_Grav[ iPlayers[ i ] ] = false;
		set_user_gravity(iPlayers,1.0)
	}
}


public cmdMenu ( id )
{	
	static menu;
	menu = menu_create ("\ Meniu vip","meniu_vip");
	
	menu_additem ( menu,"\ Viteza[1300]","1", 0 );
	menu_additem ( menu,"\ Viteza[250]","2", 0 );
	menu_additem ( menu,"\ Gravity","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public meniu_vip ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	
	menu_item_getinfo ( menu, item, access, data, charsmax ( data ), szName, charsmax ( szName ), callback );
	
	new key = str_to_num ( data );
	
	switch ( key )
	{
		case 1:
		{
			g_Speed[id] = true;
			set_user_maxspeed(id, 1300.0)
			Chat_Color(id, "%sTi-ai ales !team1300 viteza",Tag)
		}
		case 2:
		{
			g_Speed2[id] = true
			set_user_maxspeed(id, 250.0)
			Chat_Color(id, "%sTi-ai ales !team250 viteza",Tag)
		}
		case 3:
		{
			g_Grav[id] = true
			set_user_gravity(id, 0.6)
			Chat_Color(id, "%sTi-ai ales !team500 gravitatie",Tag)
		}
	}
	menu_destroy ( menu );
	return 1;
} 

public event_curweapon( id )
{
	if(g_Speed[id])
	{
		set_user_maxspeed(id, 1300.0)
		
	}
	if(g_Speed2[id])
	{
		set_user_maxspeed(id, 250.0)
	}

	if(g_Grav[id])
	{
		set_user_gravity(id, 0.6)
	}
}

public Message_ScoreAttrib( iMsgID, iDest, iReceiver )
{
new iPlayer = get_msg_arg_int( 1 )
if(get_user_flags( iPlayer) & ADMIN_VIP && is_user_connected( iPlayer ) )
	set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD )
}

stock Chat_Color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^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();
	}
}
}
}
public client_putinserver( id )
{
	g_Speed[id] = false
	g_Speed2[id] = false
}

public client_disconnect( id ) {
	g_Speed[id] = false
	g_Speed2[id] = false
}
Am fost nevoit sa fac 2 booluri,nu inteleg de ce nu a functionat asa :|
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2446
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 255 times
Been thanked: 281 times
Contact:

26 Nov 2013, 14:43

scosmynnnn wrote:
| Afiseaza codul
#include <amxmodx>
#include <fun>

#define PLUGIN "DrVip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_VIP	ADMIN_KICK

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

new g_Speed[33], bool:g_Grav[33], bool:g_Speed2[33]

new const Tag[] = "!y[!gVIP!y]"

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipmenu","cmdVip");
	register_logevent("roundstart", 2, "1=Round_Start");
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public cmdVip ( id )
{
	if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
	{
		if(is_user_alive(id))
		{
			cmdMenu( id )
		}
		else
		{
			Chat_Color(id,"!gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ")
		}
	}
}
public roundstart( )
{
	new iPlayers[ 32 ], iNum;
	
	get_players( iPlayers, iNum, "c" );
	
	for( new i = 0; i < iNum; i++ )
	{
		g_Speed[ iPlayers[ i ] ] = false
		g_Speed2[ iPlayers [ i ] ] = false
		set_user_maxspeed(iPlayers,400.0)
		
		g_Grav[ iPlayers[ i ] ] = false;
		set_user_gravity(iPlayers,1.0)
	}
}


public cmdMenu ( id )
{	
	static menu;
	menu = menu_create ("\ Meniu vip","meniu_vip");
	
	menu_additem ( menu,"\ Viteza[1300]","1", 0 );
	menu_additem ( menu,"\ Viteza[250]","2", 0 );
	menu_additem ( menu,"\ Gravity","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public meniu_vip ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	
	menu_item_getinfo ( menu, item, access, data, charsmax ( data ), szName, charsmax ( szName ), callback );
	
	new key = str_to_num ( data );
	
	switch ( key )
	{
		case 1:
		{
			g_Speed[id] = true;
			set_user_maxspeed(id, 1300.0)
			Chat_Color(id, "%sTi-ai ales !team1300 viteza",Tag)
		}
		case 2:
		{
			g_Speed2[id] = true
			set_user_maxspeed(id, 250.0)
			Chat_Color(id, "%sTi-ai ales !team250 viteza",Tag)
		}
		case 3:
		{
			g_Grav[id] = true
			set_user_gravity(id, 0.6)
			Chat_Color(id, "%sTi-ai ales !team500 gravitatie",Tag)
		}
	}
	menu_destroy ( menu );
	return 1;
} 

public event_curweapon( id )
{
	if(g_Speed[id])
	{
		set_user_maxspeed(id, 1300.0)
		
	}
	if(g_Speed2[id])
	{
		set_user_maxspeed(id, 250.0)
	}

	if(g_Grav[id])
	{
		set_user_gravity(id, 0.6)
	}
}

public Message_ScoreAttrib( iMsgID, iDest, iReceiver )
{
new iPlayer = get_msg_arg_int( 1 )
if(get_user_flags( iPlayer) & ADMIN_VIP && is_user_connected( iPlayer ) )
	set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD )
}

stock Chat_Color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^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();
	}
}
}
}
public client_putinserver( id )
{
	g_Speed[id] = false
	g_Speed2[id] = false
}

public client_disconnect( id ) {
	g_Speed[id] = false
	g_Speed2[id] = false
}
Am fost nevoit sa fac 2 booluri,nu inteleg de ce nu a functionat asa :|

| Afiseaza codul
switch ( key )
	{
		case 1:
		{
			g_Speed[id] = true;
			set_user_maxspeed(id, 1300.0)
			Chat_Color(id, "!gTi-ai ales !team1300 viteza")
		}
		case 2:
		{
			g_Speed[id] = true
			set_user_maxspeed(id, 250.0)
			Chat_Color(id, "!gTi-ai ales !team250 viteza")
		}
		case 3:
		{
			g_Grav[id] = true
			set_user_gravity(id, 0.6)
			Chat_Color(id, "!gTi-ai ales !team500 gravitatie")
		}
	}


-->

| Afiseaza codul
switch ( key )
	{
		case 1:
		{
			g_Speed2[id] = true;
			Chat_Color(id, "!gTi-ai ales !team1300 viteza")
		}
		case 2:
		{
			g_Speed[id] = true
			Chat_Color(id, "!gTi-ai ales !team250 viteza")
		}
		case 3:
		{
			g_Grav[id] = true
			Chat_Color(id, "!gTi-ai ales !team500 gravitatie")
		}
	}

Atata timp cat ai setat boo-lul pe true nu mai este necesar sa mai scrii odata set_user_max_speed( id, 100000000 );
„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ș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

27 Nov 2013, 00:25

acuma merge dar nu prea bine
deci aleg 1300 viteza, e ok - merge si cand schimb arma
aleg 250 viteza, e ok - merge si cand schimb arma
aleg iar 1300 viteza - merge dar cand schimb arma se duce la 250 :|
daca se poate sa puneti si un mesaj prin care sa zica: Nu esti VIP.
Image
Image
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

27 Nov 2013, 09:26

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

#define PLUGIN "DrVip"
#define VERSION "1.0"
#define AUTHOR "C0sm1N"

#define ADMIN_VIP	ADMIN_KICK

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

new g_Speed[33], bool:g_Grav[33], bool:g_Speed2[33]

new const Tag[] = "!y[!gVIP!y]"

public plugin_init () {
	
	register_plugin ("PLUGIN", "VERSION", "AUTHOR");
	register_clcmd ("say /vipmenu","cmdVip");
	register_logevent("roundstart", 2, "1=Round_Start");
	register_event("CurWeapon", "event_curweapon", "be", "1=1")
	register_message(get_user_msgid("ScoreAttrib"), "Message_ScoreAttrib")
}

public cmdVip ( id )
{
	if(get_user_flags(id) & ADMIN_VIP && !is_user_bot(id))
	{
		if(is_user_alive(id))
		{
			cmdMenu( id )
		}
		else
		{
			Chat_Color(id,"!gPoti folosii acest meniu !teamdoar cand esti in !gviata ! ")
		}
	}
        else
        {
                        Chat_Color(id,"!gNu ai acces la aceasta comanda")
                        return 1;
        }
}
public roundstart( )
{
	new iPlayers[ 32 ], iNum;
	
	get_players( iPlayers, iNum, "c" );
	
	for( new i = 0; i < iNum; i++ )
	{
		g_Speed[ iPlayers[ i ] ] = false
		g_Speed2[ iPlayers [ i ] ] = false
		set_user_maxspeed(iPlayers,400.0)
		
		g_Grav[ iPlayers[ i ] ] = false;
		set_user_gravity(iPlayers,1.0)
	}
}


public cmdMenu ( id )
{	
	static menu;
	menu = menu_create ("\ Meniu vip","meniu_vip");
	
	menu_additem ( menu,"\ Viteza[1300]","1", 0 );
	menu_additem ( menu,"\ Viteza[250]","2", 0 );
	menu_additem ( menu,"\ Gravity","3", 0 );
	
	menu_setprop ( menu, MPROP_NUMBER_COLOR,"\y");
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	
	menu_display ( id, menu, 0 );
	return 0;
}

public meniu_vip ( id, menu, item )
{
	if ( item == MENU_EXIT )
	{
		menu_destroy ( menu );
		return 1;
	}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	
	menu_item_getinfo ( menu, item, access, data, charsmax ( data ), szName, charsmax ( szName ), callback );
	
	new key = str_to_num ( data );
	
	switch ( key )
	{
		case 1:
		{
			g_Speed[id] = true;
			set_user_maxspeed(id, 1300.0)
			Chat_Color(id, "%sTi-ai ales !team1300 viteza",Tag)
		}
		case 2:
		{
			g_Speed2[id] = true
			set_user_maxspeed(id, 250.0)
			Chat_Color(id, "%sTi-ai ales !team250 viteza",Tag)
		}
		case 3:
		{
			g_Grav[id] = true
			set_user_gravity(id, 0.6)
			Chat_Color(id, "%sTi-ai ales !team500 gravitatie",Tag)
		}
	}
	menu_destroy ( menu );
	return 1;
} 

public event_curweapon( id )
{
	if(g_Speed[id])
	{
		set_user_maxspeed(id, 1300.0)
		
	}
	if(g_Speed2[id])
	{
		set_user_maxspeed(id, 250.0)
	}

	if(g_Grav[id])
	{
		set_user_gravity(id, 0.6)
	}
}

public Message_ScoreAttrib( iMsgID, iDest, iReceiver )
{
new iPlayer = get_msg_arg_int( 1 )
if(get_user_flags( iPlayer) & ADMIN_VIP && is_user_connected( iPlayer ) )
	set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD )
}

stock Chat_Color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^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();
	}
}
}
}
public client_putinserver( id )
{
	g_Speed[id] = false
	g_Speed2[id] = false
}

public client_disconnect( id ) {
	g_Speed[id] = false
	g_Speed2[id] = false
}

sunt la scoala :)) ti-am adaugat celor care nu au acces la vip sa le apara acel mesaj.Nu inteleg ce zici cu viteza /:) e normal sa se faca bug daca dai de multe ori..cel mai bine iti fac sa poata sa foloseasca odata pe runda si gata ;)
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests