Plugin Event VIP FREE [UPDATE - V4.0]

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori

User avatar
LOLpgl
Membru, skill +3
Membru, skill +3
Posts: 1263
Joined: 16 Dec 2013, 21:01
Detinator Steam: Da
SteamID: ionutcruso
Location: Rm.Valcea
Has thanked: 19 times
Been thanked: 18 times
Contact:

18 Jun 2015, 22:30

Descriere: Da un anumit flag playerilor intre anumite ore
Descarcare: -
Nume: Event VIP FREE
Versiune: 4.0
Autor: LOL
Link oficial: aici
V4.0 | Afiseaza codul
#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)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}

Instalare:

1. Fisierul vip_free.sma il puneti in addons/amxmodx/scripting
2. Fisierul vip_free.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

vip_free.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):

vip_start - ora la care incepe eventul
vip_end - ora la care se termina

ATENTIE !! Cvarul vip_start nu trebuie sa fie mai mare decat cvarul vip_end

Flagul VIP il modificati in plugin la linia:

#define FLAGS "t"
Last edited by LOLpgl on 17 Mar 2018, 22:41, edited 27 times in total.
Olium
User avatar
Nubo
Fost moderator
Fost moderator
Posts: 2771
Joined: 11 Jul 2012, 17:45
Detinator Steam: Da
CS Status: [əˈnɒn.ɪ.məs]
Reputatie: Fost scripter eXtreamCS
Fost eXtream Mod
Has thanked: 8 times
Been thanked: 26 times
Contact:

18 Jun 2015, 22:33

amxmodx si amxmisc nu sunt module in sensul "Module necesare" din model.
Cand nu merge acest forum sunt online aici:
  • * Skype: nubo_cs
    * Y!M ID: nubo_cs
User avatar
LOLpgl
Membru, skill +3
Membru, skill +3
Posts: 1263
Joined: 16 Dec 2013, 21:01
Detinator Steam: Da
SteamID: ionutcruso
Location: Rm.Valcea
Has thanked: 19 times
Been thanked: 18 times
Contact:

18 Jun 2015, 22:37

--------
Last edited by LOLpgl on 21 Jun 2015, 21:29, edited 1 time in total.
User avatar
Nubo
Fost moderator
Fost moderator
Posts: 2771
Joined: 11 Jul 2012, 17:45
Detinator Steam: Da
CS Status: [əˈnɒn.ɪ.məs]
Reputatie: Fost scripter eXtreamCS
Fost eXtream Mod
Has thanked: 8 times
Been thanked: 26 times
Contact:

18 Jun 2015, 22:41

Nu ai inteles. La "Module necesare" nu trebuie sa scrii nimic in cazul acestui plugin.
Cand nu merge acest forum sunt online aici:
  • * Skype: nubo_cs
    * Y!M ID: nubo_cs
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1446
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 124 times
Been thanked: 177 times
Contact:

18 Jun 2015, 22:45

Arată oribil codu' ăla ! :D
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
LOLpgl
Membru, skill +3
Membru, skill +3
Posts: 1263
Joined: 16 Dec 2013, 21:01
Detinator Steam: Da
SteamID: ionutcruso
Location: Rm.Valcea
Has thanked: 19 times
Been thanked: 18 times
Contact:

18 Jun 2015, 23:32

Nubo wrote:Nu ai inteles. La "Module necesare" nu trebuie sa scrii nimic in cazul acestui plugin.
Am inteles .
FaTzZu wrote:Arată oribil codu' ăla ! :D
Sunt la inceput :D
User avatar
Challenger.
Fost moderator
Fost moderator
Posts: 2628
Joined: 07 Dec 2014, 14:32
Detinator Steam: Da
Reputatie: Fost Super Moderator
Nume anterior: whisTle
Puncte: 1.7 / 3
Fond eXtream: 0
Contact:

19 Jun 2015, 20:50

Bine ca l-ai postat.
Multi il cer la sectiunea cereri.
NU sunt intermediar.

Dacă ai nevoie de ajutor pe forum dă-mi un PM şi rezolvăm.

REGULAMENT FORUM

RECLAMAȚII MODERATORI

RECLAMAȚII PM
Activitate scăzută
User avatar
tDv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 30 Nov 2014, 18:15
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

21 Jun 2015, 20:44

Dacă ar şi merge ar fi minunat...
Nu apar mesajele în Hud + că nu-mi dau seama dacă trebuie să pun "8" sau "08" pentru dimineaţă ;)).
User avatar
LOLpgl
Membru, skill +3
Membru, skill +3
Posts: 1263
Joined: 16 Dec 2013, 21:01
Detinator Steam: Da
SteamID: ionutcruso
Location: Rm.Valcea
Has thanked: 19 times
Been thanked: 18 times
Contact:

21 Jun 2015, 20:56

Merge perfect . Il am eu pe server .
Pentru 8 dimineata pui "8"
User avatar
VegaS
Fost moderator
Fost moderator
Posts: 6006
Joined: 28 Sep 2014, 15:12
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Fost intermediar
Fost membru Club eXtreamCS
Fond eXtream: 0
Location: Zalău, Sălaj
Contact:

21 Jun 2015, 21:20

LOLpgl wrote:
Nubo wrote:amxmodx si amxmisc nu sunt module in sensul "Module necesare" din model.
Am modificat :D
:)))))))))))))))))) :)))
@Mutat, nu ești scripter extreamcs să fie pus aici
Pozitia mea preferata este CEO.
User avatar
LOLpgl
Membru, skill +3
Membru, skill +3
Posts: 1263
Joined: 16 Dec 2013, 21:01
Detinator Steam: Da
SteamID: ionutcruso
Location: Rm.Valcea
Has thanked: 19 times
Been thanked: 18 times
Contact:

22 Jun 2015, 13:16

UPDATE ! Am adaugat CVAR pentru flagul VIP-ului .
User avatar
Clic
eXtream Mod
eXtream Mod
Posts: 3652
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Location: Piatra Neamt
Been thanked: 18 times
Contact:

23 Jun 2015, 09:18

Ar fi frumos sa aranjeze un scripter / mod aj scriptul si sa ofere vip si celor care au admin .


GJ pentru plugin .
Intermediez tranzactii cand am chef si timp ! :)

Image
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests