Page 1 of 1

Cerere please help

Posted: 17 Feb 2019, 17:56
by nikod1606
As dori si eu la c4 hud timer https://i.imgur.com/uTokOMl.jpg mai exact asta
| Afiseaza codul
/* 
 Bomb Countdown HUD Timer v0.2 by SAMURAI&Bocard

	* Plugin Details
 With this plugin enabled, you can see an colored Hud Message with the c4 time left, until explode
  Remeber : if until explode remains less than 8 seconds, hudmessage color will be red, if > 7 will be yellow and > 13 will be green.

	* Required Modules:
 - CSX
 
        * Credits:
- Emp` for various indicates
- Alka for full tests 

	* Changelog
 - Fixed Events problems
 - Pcvars
 - Fixed any bug on plugin

*/


#include <amxmodx>
#include <csx>
 
#define PLUGIN "Bomb Countdown HUD Timer"
#define VERSION "0.2"
#define AUTHOR "SAMURAI&Bocard" 
 
new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;
 
 
public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
 
	pointnum = get_cvar_pointer("mp_c4timer");
        
 
	register_logevent("newRound", 2, "1=Round_Start");
	register_logevent("endRound", 2, "1=Round_End");
	register_logevent("endRound", 2, "1&Restart_Round_");
 
	g_msgsync = CreateHudSyncObj();
}
 
public newRound()
{
	g_c4timer = -1;
	remove_task(652450);
	b_planted = false;
}
 
public endRound()
{
	g_c4timer = -1;
	remove_task(652450);
}
 
public bomb_planted()
{
	b_planted = true;
	g_c4timer = get_pcvar_num(pointnum);
	dispTime()
	set_task(1.0, "dispTime", 652450, "", 0, "b");
}
 
public bomb_defused()
{
	if(b_planted)
	{
		remove_task(652450);
		b_planted = false;
	}
    
}
 
public bomb_explode()
{
	if(b_planted)
	{
		remove_task(652450);
		b_planted = false;
	}
	
}
 
public dispTime()
{   
	if(!b_planted)
	{
		remove_task(652450);
		return;
	}
        
 
	if(g_c4timer >= 0)
	{
		if(g_c4timer > 13) set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
		else if(g_c4timer > 7) set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
		else set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
 
		ShowSyncHudMsg(0, g_msgsync, "[PRO]Bomba explodeaza in: %d secunde", g_c4timer);
             
 
		--g_c4timer;
	}
  
} 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
sa se adauge ca in poza ADD TO FAVORITES si sa fie sincronizat dupa bomba gen cand explodeaza sa nu mai apara


un anti rush ca in poza asta daca se poate si daca treci si te omoara sa iti apara un info nu ai voie sa faci rush inainte de 1 minut 30 ceva de genu
https://i.imgur.com/MEL6pLE.jpg


3. o comanda time premium /timepremium care sa te anunte in chat ca in poza https://i.imgur.com/CFZf0vk.jpg in cat timp incepe event vip free si cand ajunge la 00.00 sa se execute comanda amx_cvar amx_vip 1
multumesc frumos cu stima salutam

Re: Cerere please help

Posted: 17 Feb 2019, 19:03
by levin
1 | Afiseaza codul
[code]
/* 
 Bomb Countdown HUD Timer v0.2 by SAMURAI&Bocard

	* Plugin Details
 With this plugin enabled, you can see an colored Hud Message with the c4 time left, until explode
  Remeber : if until explode remains less than 8 seconds, hudmessage color will be red, if > 7 will be yellow and > 13 will be green.

	* Required Modules:
 - CSX
 
        * Credits:
- Emp` for various indicates
- Alka for full tests 

	* Changelog
 - Fixed Events problems
 - Pcvars
 - Fixed any bug on plugin

*/


#include <amxmodx>
#include <csx>
 
#define PLUGIN "Bomb Countdown HUD Timer"
#define VERSION "0.2"
#define AUTHOR "SAMURAI&Bocard" 
 
new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;
 
 
public plugin_init()
{
	register_plugin(PLUGIN,VERSION,AUTHOR);
 
	pointnum = get_cvar_pointer("mp_c4timer");
        
 
	register_logevent("newRound", 2, "1=Round_Start");
	register_logevent("endRound", 2, "1=Round_End");
	register_logevent("endRound", 2, "1&Restart_Round_");
 
	g_msgsync = CreateHudSyncObj();
}
 
public newRound()
{
	g_c4timer = -1;
	remove_task(652450);
	b_planted = false;
}
 
public endRound()
{
	g_c4timer = -1;
	remove_task(652450);
}
 
public bomb_planted()
{
	b_planted = true;
	g_c4timer = get_pcvar_num(pointnum);
	dispTime()
	set_task(1.0, "dispTime", 652450, "", 0, "b");
}
 
public bomb_defused()
{
	if(b_planted)
	{
		remove_task(652450);
		b_planted = false;
	}
    
}
 
public bomb_explode()
{
	if(b_planted)
	{
		remove_task(652450);
		b_planted = false;
	}
	
}
 
public dispTime()
{   
	if(!b_planted)
	{
		remove_task(652450);
		return;
	}
        
 
	if(g_c4timer >= 0)
	{
		if(g_c4timer > 13) set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
		else if(g_c4timer > 7) set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
		else set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
 
		ShowSyncHudMsg(0, g_msgsync, "[PRO]Bomba explodeaza in: %d secunde^nAdd to favorites VIP.INDUNGI.RO", g_c4timer);
             
 
		--g_c4timer;
	}
  
} 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/[/code]
2
https://forums.alliedmods.net/showthrea ... 11?t=27111
pluginuri-extream/rush-manual-t342942.html
https://forums.alliedmods.net/attachmen ... 1225109937 SAU un update ciudat > https://forums.alliedmods.net/showpost. ... stcount=34
3-trb plg de vip free

Re: Cerere please help

Posted: 17 Feb 2019, 21:07
by nikod1606
la 3 , pluginu meu are vip free :D inregistrat cvar . doar ca vreau comanda aia chat timepremium

Re: Cerere please help

Posted: 17 Feb 2019, 22:19
by levin
trb plg de vip > Îmi trebuie plugin-ul de vip

Re: Cerere please help

Posted: 18 Feb 2019, 16:02
by levin
free_vip | Afiseaza codul
[code]
#include <amxmodx>

new const vip_time[] = {23, 10};

new g_maxplayers,vip_free = 0;

public plugin_init()
{
	register_plugin("Vip Free", "4.0", "cyby");
	
	set_task(1.0, "check_time");
	set_task(60.0, "check_time", _, _, _, "b");
	set_task(1.0, "hud_mess", _, _, _, "b");
	
	g_maxplayers = get_maxplayers();

	register_clcmd("say /timepremium", "time_remain");
	register_clcmd("say_team /timepremium", "time_remain");
}

public client_putinserver(id)
{
	if(!vip_free)
		return;
	
	if(!(get_user_flags(id) & ADMIN_LEVEL_G))
	{
		new flags = get_user_flags(id);
		flags |= ADMIN_LEVEL_G
		set_user_flags(id, flags);
	}
}

public check_time()
{
	new o;
	time(o, _, _);
	
	if(!vip_free)
	{
		if(o >= vip_time[0] || o < vip_time[1])
		{
			vip_free = 1;
			set_cvar_num("amx_vip", 1);
			ColorChat(0, "^4[PARAZITII]:^1 Eventul^4 - VIP GRATUIT -^1 s-a activat chiar in acest moment.");
		}
	}
	else
	{
		if(o < vip_time[0] && o >= vip_time[1])
		{
			vip_free = 0;
			set_cvar_num("amx_vip", 0);
			ColorChat(0, "^4[PARAZITII]:^1 Eventul^4 - VIP GRATUIT -^1 s-a dezactivat chiar in acest moment.");

			for(new i = 1; i <= g_maxplayers; i++)
			{
				if(!is_user_connected(i) || get_user_flags(i) & ADMIN_LEVEL_G)
					continue;
					
				remove_user_flags(i);
			}
			server_cmd("amx_reloadadmins");
		}
	}
}

public time_remain(id)
{
	switch(vip_free)
	{
		case 1: ColorChat(id, "^4[PARAZITII]:^1 Eventul^4 - VIP GRATUIT -^1 se sfarseste in:^4 %s.", time_left_vip());
		case 0: ColorChat(id, "^4[PARAZITII]:^1 Eventul^4 - VIP GRATUIT -^1 incepe in:^4 %s.", time_left_vip());
	}
	return PLUGIN_CONTINUE;
}

public hud_mess()
{
	if(!vip_free)
		return;
	
	new flage;
	for(new i = 1; i <= g_maxplayers; i++)
	{
		if(!is_user_connected(i) || get_user_flags(i) & ADMIN_LEVEL_G)
			continue;
			
		flage = get_user_flags(i);
		flage |= ADMIN_LEVEL_G
		set_user_flags(i, flage);
	}
}

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") // Green Color
    replace_all(msg, 190, "!n", "^1") // Default Color
    replace_all(msg, 190, "!t", "^3") // Team Color
    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();
            }
        }
    }
}

stock time_left_vip()
{
	new timp_ramas[16], len = 0;
	new h, m, lh, lm;
	time(h, m, _);
	switch(vip_free)
	{
		case 1:
		{
			new l = vip_time[1];
			if(h > l)
				l += add_time(h) + h;
			lh = l - h;
		}
		case 0: lh = vip_time[0] - h;
	}
	lm = 60 - m;
	if(lm < 60)
		lh--;
	
	if(lh > 0)
		len += formatex(timp_ramas[len], charsmax(timp_ramas) - len, "%d or%s", lh, lh == 1 ? "a" : "e");
		
	if(lm < 60)
		len += formatex(timp_ramas[len], charsmax(timp_ramas) - len, " %d minut%s", lm, lm == 1 ? "" : "e");
		
	return timp_ramas;
}
stock add_time(x)
{
	new j;
	switch(x)
	{
		case 0: j = 24;
		case 1: j = 23;
		case 2: j = 22;
		case 3: j = 21;
		case 4: j = 20;
		case 5: j = 19;
		case 6: j = 18;
		case 7: j = 17; 
		case 8: j = 16;
		case 9: j = 15;
		case 10: j = 14;
		case 11: j = 13;
		case 12: j = 12;
		case 13: j = 11;
		case 14: j = 10;
		case 15: j = 9;
		case 16: j = 8;
		case 17: j = 7;
		case 18: j = 6;
		case 19: j = 5;
		case 20: j = 4;
		case 21: j = 3;
		case 22: j = 2;
		case 23: j = 1;
	}
	if(x < vip_time[1])
		j = 0;
	
	return j;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/[/code]

Re: Cerere please help

Posted: 18 Feb 2019, 23:32
by nikod1606
salut levin e perfect doar ca atunci cand dau amx_vip 1 sau amx_vip 0 sa pornesc opresc nu imi raspunde sau care sunt cvar-urile pe care le-ai pus si la timp cum setez cat timp sa fie event-ul ?

Re: Cerere please help

Posted: 19 Feb 2019, 01:27
by levin
new const vip_time[] = {23, 10};
la ora 23 se activează amx_vip pe 1, iar la 10 se dezactivează amx_vip 0, nu trebuie să mai setezi tu nimic din cvar

Re: Cerere please help

Posted: 19 Feb 2019, 11:58
by nikod1606
salut levin , e cam complicat ar trebui sa compilez de fiecare data . nu se poate face printr-un cvar sa setez amx_cvar vip_time 1 , si gen sa porneasca intr-o ora eventul free vip

Re: Cerere please help

Posted: 21 Feb 2019, 10:55
by nikod1606
upp

Re: Cerere please help

Posted: 24 Feb 2019, 00:26
by nikod1606
ma mai ajuta cineva ?