plugin live problema

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
BitZaGold
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 28 Feb 2018, 13:29
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: SKILL.LALEAGANE.RO
SteamID: DA
Fond eXtream: 0
Location: CT
Contact:

02 Apr 2020, 16:55

Salut. Vreau la acest plugin de restart prima runda sa se dea decat prima rund gen warmup. Se tot da restart mereu cand castiga o echipa CT/TERO.

http://www.girlshare.ro/3769887045.1
RoyalServer 2
User avatar
mariusexeqt
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 199
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 4 times
Contact:

02 Apr 2020, 19:07

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <colorchat> 


new g_Count = 0
new bool: g_Data = false

public plugin_init()
{
	register_plugin("Live","1.0","-") 

	register_event("TextMsg","game_commencing","a","2&#Game_C")
	register_event("HLTV","new_round","a","1=0","2=0")


	set_hudmessage(255, 0, 170, -1.0, 0.2, 1, 6.0, 10.0)
}

public game_commencing() 
	g_Data = true

public new_round(id) {
	if( g_Data == true )
		g_Count++

	if( g_Count == 1 ) {
	show_hudmessage(0, "Live next round !^n Good Luck & Have Fun !!^n")

	} 

	if( g_Count == 2 ) {
	server_cmd("sv_restart 3")
	set_task(0.1,"msg1",id)  
	set_task(0.2,"screeneffect",id)
	
	}
	return PLUGIN_CONTINUE; 
}


public msg1(id) 
{ 
	client_cmd(0,"spk ^"life in three seconds^"")
	new hostname[64]
	get_cvar_string("hostname",hostname,63)
	ColorChat(id, GREEN, "[^x03 %s^x04 ]^x01 |---------------^x04 LiVE !^x01 ---------------|", hostname)
	ColorChat(id, GREEN, "[^x03 %s^x04 ]^x01 |---------------^x04 LiVE !^x01 ---------------|", hostname)
	ColorChat(id, GREEN, "[^x03 %s^x04 ]^x01 |---------------^x04 LiVE !^x01 ---------------|", hostname)
	new restartname[32]
	get_user_name(id, restartname, 31)
	ColorChat(id, GREEN, "^x01 Echipa^x04 %s^x03 Va Ureaza Spor La Fraguri^x01 !", restartname)
}  


public screeneffect(id)  
{ 
	new players[32], playerx,a,inum
	get_players(players, inum)
	for(a = 0; a < inum; ++a) {
	playerx = players[a];
	switch (get_user_team(playerx)){
            case 1: {
                Fade(playerx,255,0,0,30) 
            }
            case 2: {
                Fade(playerx,0,0,255,30)
            }
            case 3:{
                Fade(playerx,0,255,0,30)
            }
        }
    } 
} 

stock Fade(index,red,green,blue,alpha)
{
	message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},index)
	write_short(5<<10)
	write_short(5<<10)
	write_short(5<<12)
	write_byte(red)
	write_byte(green)
	write_byte(blue)
	write_byte(alpha)
	message_end()
}
User avatar
BitZaGold
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 28 Feb 2018, 13:29
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: SKILL.LALEAGANE.RO
SteamID: DA
Fond eXtream: 0
Location: CT
Contact:

02 Apr 2020, 19:48

Trebuie sa fie mai multi jucatori pe sv? k sa se dea restart ca nu imi merge am schimbat mapa a mjucat pana a expirat timpu meci-ului si nimic.
User avatar
mariusexeqt
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 199
Joined: 01 Jan 2020, 22:55
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 4 times
Been thanked: 4 times
Contact:

02 Apr 2020, 20:01

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <colorchat> 


new count = 0

public plugin_init()  
{
	register_plugin("Live","1.0","-") 

	register_event("TextMsg","game_commencing","a","2&#Game_C")
	register_event("HLTV","new_round","a","1=0","2=0") 

	set_hudmessage(255, 0, 170, -1.0, 0.2, 1, 6.0, 10.0)
}

public game_commencing() 
	count = 0

public new_round(id) {
	
	if(count == 2)
	{
		server_cmd("sv_restart 2")
		show_hudmessage(0, "Good Luck & Have Fun !!")
	}
	
	if(count < 3)
		count++

	
	server_cmd("sv_restart 3")
	set_task(0.1,"msg1",id)  
	set_task(0.2,"screeneffect",id)
	
}

public msg1(id) 
{ 
	client_cmd(0,"spk ^"life in three seconds^"")
	new hostname[64]
	get_cvar_string("hostname",hostname,63)
	ColorChat(id, GREEN, "[^x03 %s^x04 ]^x01 |---------------^x04 LiVE !^x01 ---------------|", hostname)
	ColorChat(id, GREEN, "[^x03 %s^x04 ]^x01 |---------------^x04 LiVE !^x01 ---------------|", hostname)
	ColorChat(id, GREEN, "[^x03 %s^x04 ]^x01 |---------------^x04 LiVE !^x01 ---------------|", hostname)
	new restartname[32]
	get_user_name(id, restartname, 31)
	ColorChat(id, GREEN, "^x01 Echipa^x04 %s^x03 Va Ureaza Spor La Fraguri^x01 !", restartname)
}  

public screeneffect(id)  
{ 
	new players[32], playerx,a,inum
	get_players(players, inum)
	for(a = 0; a < inum; ++a) {
	playerx = players[a];
	switch (get_user_team(playerx)){
            case 1: {
                Fade(playerx,255,0,0,30) 
            }
            case 2: {
                Fade(playerx,0,0,255,30)
            }
            case 3:{
                Fade(playerx,0,255,0,30)
            }
        }
    } 
} 

stock Fade(index,red,green,blue,alpha)
{
	message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},index)
	write_short(5<<10)
	write_short(5<<10)
	write_short(5<<12)
	write_byte(red)
	write_byte(green)
	write_byte(blue)
	write_byte(alpha)
	message_end()
}
User avatar
BitZaGold
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 28 Feb 2018, 13:29
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: SKILL.LALEAGANE.RO
SteamID: DA
Fond eXtream: 0
Location: CT
Contact:

02 Apr 2020, 20:17

NU merge cum tre sa mearga se da restart intr-una
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests