[Cerere Plugin] VIP Clasic [Rezolvat]

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
deyu*
Membru, skill +1
Membru, skill +1
Posts: 255
Joined: 27 Oct 2013, 16:46
Detinator Steam: Da
CS Status: Play Hard Cs
Detinator server CS: Nu
SteamID: Popeofcanada
Location: Romania / Timis / Timisoara
Has thanked: 3 times
Been thanked: 1 time
Contact:

17 May 2020, 11:26

Plugin Cerut: vip
Descriere (adica ce face el mai exact): Da playerilor cu grad vip acces la un meniu cu arme .
Serverul impune conditii strict HLDS/REHLDS?: HLDS
Ai cautat pluginul?(daca da, precizeaza cum): L-am cautat pe google , pe alte comunitati inclusiv aici cereri-pluginuri/cerere-plugin-vip-clas ... 47280.html dar nici un sma nu este ok si as vrea sa se mai adauge ceva daca se poate
Necesita mod special?: Clasic

As dorii sa fie ca in aceasta imagine https://imgur.com/a/IiH2OiU si la tero si la ct aceleasi arme + deagle + grenade inafara de smoke
sa contina skin-uri diferite de restul playerilor , alta culoare la arme sau orice alt skin doar sa fie diferit de al playerilor normali si sa fie activ for all intre orele 22 si 12
Multumesc anticipat !
Last edited by WHOAMI? on 28 May 2020, 14:03, edited 1 time in total.
Reason: Marcat ca "Rezolvat"
Image
User: Deyu*
Y/M : deyu_design
Zonek
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

21 May 2020, 11:47

Code: Select all

#pragma tabsize 0

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < nvault >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Classic"
#define VERSION "1.0"
#define AUTHOR "Binecuvantat aka KillerElite"

new cs_viptero[] = "models/player/cs_skinviptero/cs_skinviptero.mdl"
new cs_vipct[] = "models/player/cs_skinvipct/cs_skinvipct.mdl"

new eUsed[33];

public plugin_precache()
{
	precache_model(cs_viptero)
	precache_model(cs_vipct)
}

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /vmenu", "cmdMenuVIP");
	RegisterHam ( Ham_Spawn, "player", "Respawnplayer", 1 );
}

public cmdMenuVIP (id)
{

	if (eUsed[id] == 1)
	{
		client_print(id, print_chat, "[VIP]Ai ales deja un set de arme!")
		return 1;		
	}

	else if (get_user_flags(id) & ADMIN_LEVEL_H)
	{
		new menu = menu_create ( "\yVIP Pack:", "give_vipmenu" );
		menu_additem ( menu, "M4A1 \y+ \wDeagle", "1", 0 );
		menu_additem ( menu, "AK47 \y+ \wDeagle", "2", 0 );
		menu_additem ( menu, "AWP \y+ \wDeagle", "3", 0 );
			
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
		
		
		return 1;
	}

	else
	{
		client_print(id, print_chat, "[VIP]Doar persoanele VIP pot folosi acest meniu!")
		return 1;
	}

	return 1;
}

public give_vipmenu ( id, menu, item ) {
	
	if( item == MENU_EXIT )
	{
		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:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 300);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales M4A1 + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
		
		case 2:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 300);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales AK47 + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
		
		case 3:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_awp")
			cs_set_user_bpammo(id, CSW_AWP, 300);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales AWP + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
	}

	return 1;
}

public Respawnplayer(id)
{
	if (get_user_flags(id) & ADMIN_LEVEL_H)
	{
		eUsed[id] = 0;
		if (cs_get_user_team(id) == CS_TEAM_T)
		{
			cmdMenuVIP(id);
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_model(id, "cs_viptero")
			set_user_health(id, 200)
		}
		
		if (cs_get_user_team(id) == CS_TEAM_CT)
		{
			cmdMenuVIP(id);
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			cs_set_user_model(id, "cs_vipct")
			set_user_health(id, 200)
		}
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
Deci aici ai pluginul cerut. Ce are: VIP pe flag T (iti da 200HP la spawn, sansa de a alege o data din meniul de vip (ti-l activeaza automat la spawn, sau scrii /vmenu), iti da skin personificat (aici le alegi tu) si iti da un set de grenazi (1 he si un flash). )
MODELELE:
cstrike/models/player/cs_skinviptero/cs_skinviptero.mdl (aici pui cel de tero)
cstrike/models/player/cs_skinvipct/cs_skinvipct.mdl (aici pui cel de ct)

Pluginul de vip free:

Code: Select all

#include <amxmodx>
#include <amxmisc>

new start,
stop,
minutes,
h,
m

new bool: HaveVipBefore[33];

#define FLAGS "t"

public plugin_init()
{
    register_plugin("VIP FREE", "4.0", "LOL")
    
    start = register_cvar( "vip_start", "20" );
    stop = register_cvar( "vip_end", "23" );
    minutes = register_cvar( "vip_minutes", "00" ); // nu modificati
    
    set_task( 60.0, "check", _, _, _, "b" );
    
}

public client_putinserver(id)
{
    check(id)
}
public check(id)
{
    
    time( h, m, _ );
    new flags = read_flags(FLAGS)
    
    if(h >= get_pcvar_num( start ) && h < get_pcvar_num( stop ))
    {        
        if(!(get_user_flags(id) & flags ))
        {
            set_user_flags(id, flags)
            server_cmd( "amx_reloadadmins" );
            HaveVipBefore[id] = false;
            }else{
            HaveVipBefore[id] = true;
        }
        if(h == get_pcvar_num( start ) && m == get_pcvar_num( minutes ))
        {
            ColorChat(0, "!g***** !tFREE VIP EVENT STARTED !g*****")
            log_amx("***** FREE VIP EVENT STARTED *****")
        }
        
        set_hudmessage(random(256), random(256), random(256),0.02, 0.2, 1, _, 59.0, _, _, -1)
        show_hudmessage(0, "** FREE VIP EVENT ACTIVE **")
    }
    else if(h < get_pcvar_num( start ) || h >= get_pcvar_num( stop ))
    {
        if (!(HaveVipBefore[id]))
        {
            remove_user_flags(id, flags);
            server_cmd( "amx_reloadadmins" );
        }
        if(h == get_pcvar_num( stop ) && m == get_pcvar_num( minutes ))
        {
            ColorChat(0, "!g***** !tFREE VIP EVENT ENDED !g*****")
            log_amx("***** FREE VIP EVENT ENDED *****")
        }
    }
}

stock ColorChat(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, "!n", "^1");
    replace_all(msg, 190, "!t", "^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();
            }
        }
    }
} 
BB.ALPHACS.RO
User avatar
deyu*
Membru, skill +1
Membru, skill +1
Posts: 255
Joined: 27 Oct 2013, 16:46
Detinator Steam: Da
CS Status: Play Hard Cs
Detinator server CS: Nu
SteamID: Popeofcanada
Location: Romania / Timis / Timisoara
Has thanked: 3 times
Been thanked: 1 time
Contact:

22 May 2020, 12:58

Code: Select all

cstrike/models/player/cs_skinviptero/cs_skinviptero.mdl (aici pui cel de tero)
cstrike/models/player/cs_skinvipct/cs_skinvipct.mdl (aici pui cel de ct)
aici imi e model la player nu ? eu la arme vreau fara model la player doar arma sa fie diferita

edit: l-am pus pe server sa il testez si cred ca ai vrut sa apara cu verde pe alocuri la scris sau colorat cel putin dar imi apare y+ m4a1 si la aka si la awp si intre m4a1 si deagle
Image
User: Deyu*
Y/M : deyu_design
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

23 May 2020, 11:47

Lasa-mi atunci niste modele si armele pe care vrei sa fie skinurile diferite (eventual daca vrei dmg in plus pe ele) pana scot eu modelele la playeri si repar culoarea din meniu (revin cu edit in 5m)

EDIT:

Code: Select all

#pragma tabsize 0

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < nvault >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Classic"
#define VERSION "1.0"
#define AUTHOR "Binecuvantat aka KillerElite"

new eUsed[33];


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /vmenu", "cmdMenuVIP");
	RegisterHam ( Ham_Spawn, "player", "Respawnplayer", 1 );
}

public cmdMenuVIP (id)
{

	if (eUsed[id] == 1)
	{
		client_print(id, print_chat, "[VIP]Ai ales deja un set de arme!")
		return 1;		
	}

	else if (get_user_flags(id) & ADMIN_LEVEL_H)
	{
		new menu = menu_create ( "VIP Pack:", "give_vipmenu" );
		menu_additem ( menu, "\wM4A1 \r+ \wDeagle", "1", 0 );
		menu_additem ( menu, "\wAK47 \r+ \wDeagle", "2", 0 );
		menu_additem ( menu, "\wAWP \r+ \wDeagle", "3", 0 );
			
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
		
		
		return 1;
	}

	else
	{
		client_print(id, print_chat, "[VIP]Doar persoanele VIP pot folosi acest meniu!")
		return 1;
	}

	return 1;
}

public give_vipmenu ( id, menu, item ) {
	
	if( item == MENU_EXIT )
	{
		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:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 300);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales M4A1 + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
		
		case 2:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 300);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales AK47 + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
		
		case 3:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_awp")
			cs_set_user_bpammo(id, CSW_AWP, 300);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales AWP + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
	}

	return 1;
}

public Respawnplayer(id)
{
	if (get_user_flags(id) & ADMIN_LEVEL_H)
	{
		eUsed[id] = 0;
		if (cs_get_user_team(id) == CS_TEAM_T)
		{
			cmdMenuVIP(id);
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			set_user_health(id, 200)
		}
		
		if (cs_get_user_team(id) == CS_TEAM_CT)
		{
			cmdMenuVIP(id);
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
			set_user_health(id, 200)
		}
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
BB.ALPHACS.RO
User avatar
deyu*
Membru, skill +1
Membru, skill +1
Posts: 255
Joined: 27 Oct 2013, 16:46
Detinator Steam: Da
CS Status: Play Hard Cs
Detinator server CS: Nu
SteamID: Popeofcanada
Location: Romania / Timis / Timisoara
Has thanked: 3 times
Been thanked: 1 time
Contact:

23 May 2020, 14:11

Acestea sunt skinurile pe care doresc sa le pun

https://www.udrop.com/8Q3/ak_skin.rar
https://www.udrop.com/8Q4/awp_skin.rar
https://www.udrop.com/8Q5/m4a1_skin.rar

edit: Vip-ul il doresc pentru modul clasic , pune te rog frumos la hp 100 si la gloantele armelor 90 si 30 la awp cum sunt defaul in joc
iar la meniu nu apar culorile care ai incercat sa le pui apare asa : https://imgur.com/a/aZBLiWb
Image
User: Deyu*
Y/M : deyu_design
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

24 May 2020, 16:12

Code: Select all

#pragma tabsize 0

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < nvault >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Classic"
#define VERSION "1.0"
#define AUTHOR "Binecuvantat aka KillerElite"

new eUsed[33];

//========= vip guns ==========

new v_m4a1_vip [66] = "models/csguns/v_m4a1_vip.mdl";
new p_m4a1_vip [66] = "models/csguns/p_m4a1_vip.mdl";

new v_ak_vip [66] = "models/csguns/v_ak_vip.mdl";
new p_ak_vip [66] = "models/csguns/p_ak_vip.mdl";

new v_awp_vip [66] = "models/csguns/v_awp_vip.mdl";
new p_awp_vip [66] = "models/csguns/p_awp_vip.mdl";

//============================



public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /vmenu", "cmdMenuVIP");
	RegisterHam ( Ham_Spawn, "player", "Respawnplayer", 1 );
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public plugin_precache()
{
	precache_model(v_m4a1_vip) 
	precache_model(p_m4a1_vip) 
	precache_model(v_ak_vip) 
	precache_model(p_ak_vip) 
	precache_model(v_awp_vip) 
	precache_model(p_awp_vip) 
}

public cmdMenuVIP (id)
{

	if (eUsed[id] == 1)
	{
		client_print(id, print_chat, "[VIP]Ai ales deja un set de arme!")
		return 1;		
	}

	else if (get_user_flags(id) & ADMIN_LEVEL_H)
	{
		new menu = menu_create ( "VIP Pack:", "give_vipmenu" );
		menu_additem ( menu, "M4A1 + Deagle", "1", 0 );
		menu_additem ( menu, "AK47 + Deagle", "2", 0 );
		menu_additem ( menu, "AWP + Deagle", "3", 0 );
			
		menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
		menu_display ( id, menu, 0 );
		
		
		return 1;
	}

	else
	{
		client_print(id, print_chat, "[VIP]Doar persoanele VIP pot folosi acest meniu!")
		return 1;
	}

	return 1;
}

public give_vipmenu ( id, menu, item ) {
	
	if( item == MENU_EXIT )
	{
		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:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 35);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales M4A1 + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
		
		case 2:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 35);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales AK47 + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
		
		case 3:
		{
			eUsed[id] = 1;
			give_item(id, "weapon_awp")
			cs_set_user_bpammo(id, CSW_AWP, 30);
			give_item(id, "weapon_deagle")
			cs_set_user_bpammo(id, CSW_DEAGLE, 35);
			give_item(id, "weapon_knife");
			client_print(id, print_chat, "[VIP]Ai ales AWP + Deagle.")
			menu_destroy ( menu );
			return 1;	
		}
	}

	return 1;
}

public Respawnplayer(id)
{
	if (get_user_flags(id) & ADMIN_LEVEL_H)
	{
		eUsed[id] = 0;
		if (cs_get_user_team(id) == CS_TEAM_T)
		{
			cmdMenuVIP(id);
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
		}
		
		if (cs_get_user_team(id) == CS_TEAM_CT)
		{
			cmdMenuVIP(id);
			give_item(id, "weapon_hegrenade")
			give_item(id, "weapon_flashbang")
		}
	}
}

public CurrentWeapon ( id ) 
{
	if ( get_user_weapon(id) == CSW_M4A1 ) 
	{
		if ( get_user_flags(id) & ADMIN_LEVEL_H ) 
		{
			set_pev ( id, pev_viewmodel2, v_m4a1_vip );
			set_pev ( id, pev_weaponmodel2, p_m4a1_vip );
		}
		return 1;
	}
	if ( get_user_weapon(id) == CSW_AK47 ) 
	{
		if ( get_user_flags(id) & ADMIN_LEVEL_H ) 
		{
			set_pev ( id, pev_viewmodel2, v_ak_vip );
			set_pev ( id, pev_weaponmodel2, p_ak_vip );
		}
		return 1;
	}
	if ( get_user_weapon(id) == CSW_AWP ) 
	{
		if ( get_user_flags(id) & ADMIN_LEVEL_H ) 
		{
			set_pev ( id, pev_viewmodel2, v_awp_vip );
			set_pev ( id, pev_weaponmodel2, p_awp_vip );
		}
		return 1;
	}

	return 1;
}




/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
cam asta este codul si resursele le ai aici:
https://www9.zippyshare.com/v/QX4gHtBk/file.html

Sa-mi spui daca mai ai nevoie de ajutor la ceva..sau daca am omis ceva. Succes!
BB.ALPHACS.RO
User avatar
deyu*
Membru, skill +1
Membru, skill +1
Posts: 255
Joined: 27 Oct 2013, 16:46
Detinator Steam: Da
CS Status: Play Hard Cs
Detinator server CS: Nu
SteamID: Popeofcanada
Location: Romania / Timis / Timisoara
Has thanked: 3 times
Been thanked: 1 time
Contact:

24 May 2020, 20:44

pluginul functioneaza perfect acum cu tot cu skinuri iti multumesc mult !!
singurul bai e ca nu se potriveste cu cel pentru event care mi l-ai lasat

Atat as mai dori daca ai puntea modifica flagul cred sau ce trebuie la acesta si orele intre care sa fie free sa fie 21 seara pana la 11 dimineata

Code: Select all

#include <amxmodx>
#include <amxmisc>

new start,
stop,
minutes,
h,
m

new bool: HaveVipBefore[33];

#define FLAGS "t"

public plugin_init()
{
    register_plugin("VIP FREE", "4.0", "LOL")
    
    start = register_cvar( "vip_start", "20" );
    stop = register_cvar( "vip_end", "23" );
    minutes = register_cvar( "vip_minutes", "00" ); // nu modificati
    
    set_task( 60.0, "check", _, _, _, "b" );
    
}

public client_putinserver(id)
{
    check(id)
}
public check(id)
{
    
    time( h, m, _ );
    new flags = read_flags(FLAGS)
    
    if(h >= get_pcvar_num( start ) && h < get_pcvar_num( stop ))
    {        
        if(!(get_user_flags(id) & flags ))
        {
            set_user_flags(id, flags)
            server_cmd( "amx_reloadadmins" );
            HaveVipBefore[id] = false;
            }else{
            HaveVipBefore[id] = true;
        }
        if(h == get_pcvar_num( start ) && m == get_pcvar_num( minutes ))
        {
            ColorChat(0, "!g***** !tFREE VIP EVENT STARTED !g*****")
            log_amx("***** FREE VIP EVENT STARTED *****")
        }
        
        set_hudmessage(random(256), random(256), random(256),0.02, 0.2, 1, _, 59.0, _, _, -1)
        show_hudmessage(0, "** FREE VIP EVENT ACTIVE **")
    }
    else if(h < get_pcvar_num( start ) || h >= get_pcvar_num( stop ))
    {
        if (!(HaveVipBefore[id]))
        {
            remove_user_flags(id, flags);
            server_cmd( "amx_reloadadmins" );
        }
        if(h == get_pcvar_num( stop ) && m == get_pcvar_num( minutes ))
        {
            ColorChat(0, "!g***** !tFREE VIP EVENT ENDED !g*****")
            log_amx("***** FREE VIP EVENT ENDED *****")
        }
    }
}

stock ColorChat(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, "!n", "^1");
    replace_all(msg, 190, "!t", "^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();
            }
        }
    }
} 
Image
User: Deyu*
Y/M : deyu_design
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

25 May 2020, 10:40

Code: Select all

#include <amxmodx>
#include <amxmisc>

new start,
stop,
minutes,
h,
m

new bool: HaveVipBefore[33];

#define FLAGS "t"

public plugin_init()
{
    register_plugin("VIP FREE", "4.0", "LOL")
    
    start = register_cvar( "vip_start", "21" );
    stop = register_cvar( "vip_end", "11" );
    minutes = register_cvar( "vip_minutes", "00" ); // nu modificati
    
    set_task( 60.0, "check", _, _, _, "b" );
    
}

public client_putinserver(id)
{
    check(id)
}
public check(id)
{
    
    time( h, m, _ );
    new flags = read_flags(FLAGS)
    
    if(h >= get_pcvar_num( start ) && h < get_pcvar_num( stop ))
    {        
        if(!(get_user_flags(id) & flags ))
        {
            set_user_flags(id, flags)
            server_cmd( "amx_reloadadmins" );
            HaveVipBefore[id] = false;
            }else{
            HaveVipBefore[id] = true;
        }
        if(h == get_pcvar_num( start ) && m == get_pcvar_num( minutes ))
        {
            ColorChat(0, "!g***** !tFREE VIP EVENT STARTED !g*****")
            log_amx("***** FREE VIP EVENT STARTED *****")
        }
        
        set_hudmessage(random(256), random(256), random(256),0.02, 0.2, 1, _, 59.0, _, _, -1)
        show_hudmessage(0, "** FREE VIP EVENT ACTIVE **")
    }
    else if(h < get_pcvar_num( start ) || h >= get_pcvar_num( stop ))
    {
        if (!(HaveVipBefore[id]))
        {
            remove_user_flags(id, flags);
            server_cmd( "amx_reloadadmins" );
        }
        if(h == get_pcvar_num( stop ) && m == get_pcvar_num( minutes ))
        {
            ColorChat(0, "!g***** !tFREE VIP EVENT ENDED !g*****")
            log_amx("***** FREE VIP EVENT ENDED *****")
        }
    }
}

stock ColorChat(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, "!n", "^1");
    replace_all(msg, 190, "!t", "^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();
            }
        }
    }
} 
Sa vezi daca iti merge acum. (poti schimba si tu ora din cvar amx_cvar vip_start "ora" si amx_cvar vip_end "ora"). Daca nu functioneaza lasa un reply din nou. Succes!
BB.ALPHACS.RO
User avatar
deyu*
Membru, skill +1
Membru, skill +1
Posts: 255
Joined: 27 Oct 2013, 16:46
Detinator Steam: Da
CS Status: Play Hard Cs
Detinator server CS: Nu
SteamID: Popeofcanada
Location: Romania / Timis / Timisoara
Has thanked: 3 times
Been thanked: 1 time
Contact:

25 May 2020, 11:34

cred ca merge ,am intrat doar si am testat cvar nu am mai intrat si ca player sa testez , iti multumesc foarte mult pentru tot ajutorul oferit
o zi placuta !!
Image
User: Deyu*
Y/M : deyu_design
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

25 May 2020, 14:00

Cu drag. Puteti da TC!
Daca mai ai nevoie de ajutor la altceva, faci o cerere aici sau ma poti contacta :).
Succes.
BB.ALPHACS.RO
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests