Colorare plugin.

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
jrdxand
Membru, skill 0
Membru, skill 0
Posts: 6
Joined: 09 Dec 2018, 01:06
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

15 Feb 2019, 02:14

Salut. Poate cineva va faca acest plugin cu text color? Textul sa poata contine 3 culori: normal, verde si teamcolor. Multumesc!
EDIT: Se pot schimba sunetele? Pot adauga sunetele pe care le doresc eu?
| Afiseaza codul
/*
Event Sounds (CS) (c) 2005 Zenith77

-=-=-=-=-=-=-

[RANT]

Well, one day I was looking through the Counter-Strike .GCF file and noticed some nice little 
event sounds, that were possibly used in an earlier version of the game, so i decided to bring them
back :)

[/RANT]

-=-=-=-=-=-=-

-=-=-=Description=-


This just plays a sound depending on the event, bomb explosion, team mate died, etc.

-=-=-=-=-=-=-=-=-

-=-=CVARS=-=-=-=-

amx_sound_events 1 = on : 0 = off: Determines if the plugin is on or off

amx_sound_notify 1 = on : 0 = off: Determines where or not to display a message to a user
about an event

Example:

Team Mate Died:

"[AMXX] A friendly player died"


-=-=-=-=-=-=-=-


-=-=-=-= Notes =-=-=-

No extra sounds needed, just install like any other plugin.

Requires cstrike Module !

-=-=-=-=-=-=-

*/


#include <amxmodx>
#include <amxmisc>
#include <cstrike>




#define PLUGIN "Event Sounds (CS)"
#define VERSION "1.0"
#define AUTHOR "Zenith77"




public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_cvar("amx_sound_events", "1" )
	register_cvar("amx_sound_notify", "1" )
	
	register_event("DeathMsg", "eventDeath", "a" )
	
	register_logevent("Event_ObjPlayer", 3, "1=triggered")
	register_logevent("Event_ObjTeam", 6, "2=triggered")
}


public eventDeath() {
	
	if( !get_cvar_num("amx_sound_events")) return PLUGIN_CONTINUE
	
	new i
	new id 
	
	id = read_data(2)
	
	for( i = 1; i < get_maxplayers(); i++ ) {
		
		if( !is_user_connected(i) ) continue
		
		if( get_user_team(id) == get_user_team(i) && i != id ) {
			
			client_cmd(i, "spk ^"events/friend_died.wav^" " )
			
			if( get_cvar_num("amx_sound_notify") > 0 ) {
				
				client_print(i, print_chat, "" )
			}
		}
		
		if( get_user_team(id) != get_user_team(i) && i != id ) {
			
			client_cmd(i, "spk ^"events/enemy_died.wav^" " )
			
			if( get_cvar_num("amx_sound_notify") > 0 ) {
				
				client_print(i, print_chat, "" )
			}
			
			
		}
		
	}
	
	return PLUGIN_CONTINUE
}

public Event_ObjPlayer() {
	
	if( get_cvar_num("amx_sound_events") < 1 ) {
		
		return PLUGIN_CONTINUE
	}
	
	new arg1[32], arg2[64], name[32], id
	read_logargv(0, arg1, 31)
	read_logargv(2, arg2, 63)
	parse_loguser(arg1, name, 31, id)

	id = get_user_index(name)
	
	if( !is_user_connected(id)) return PLUGIN_CONTINUE
	
	new CsTeams:team = cs_get_user_team(id)
	
	if(equal(arg2, "Rescued_A_Hostage")) {
		
		if( team == CS_TEAM_CT ) {
			new i
			
			for( i = 1; i < get_maxplayers(); i++ ) {
				
				if( !is_user_connected(i) ) continue
				
				if( get_user_team(id) == get_user_team(i) ) {
					
					client_cmd(i, "spk ^"events/task_complete.wav^" " )
					
					if( get_cvar_num("amx_sound_notify") > 0 ) {
						
						client_print(i, print_chat, "" )
					}
				}
			}
		}
		
	}
	
	else if(equal(arg2, "Planted_The_Bomb")) {
		
		if( team == CS_TEAM_T ) {
			
			new i
			
			for( i = 1; i < get_maxplayers(); i++ ) {
				
				if( !is_user_connected(i) ) continue
				
				if( get_user_team(id) == get_user_team(i) ) {
					
					client_cmd(i, "spk ^"events/task_complete.wav^" " )
					
					if( get_cvar_num("amx_sound_notify") > 0 ) {
						
						client_print(i, print_chat, "" )
					}
				}
			}
		}
		
	}
	
	else if(equal(arg2, "Defused_The_Bomb")) {
		
		if( team == CS_TEAM_CT ) {
			
			new i
			
			for( i = 1; i < get_maxplayers(); i++ ) {
				
				if( !is_user_connected(i) ) continue
				
				if( get_user_team(id) == get_user_team(i) ) {
					
					client_cmd(i, "spk ^"events/task_complete.wav^" " )
					
					if( get_cvar_num("amx_sound_notify") > 0 ) {
						
						client_print(i, print_chat, "" )
					}
				}
			}
		}
		
	}
	
	else if(equal(arg2, "Escaped_As_VIP")) {
		
		if( team == CS_TEAM_CT ) {
			
			new i
			
			for( i = 1; i < get_maxplayers(); i++ ) {
				
				if( !is_user_connected(i) ) continue
				
				if( get_user_team(id) == get_user_team(i) ) {
					
					client_cmd(i, "spk ^"events/task_complete.wav^" " )
					
					if( get_cvar_num("amx_sound_notify") > 0 ) {
						
						client_print(i, print_chat, "" )
					}
				}
			}
		}
		
	}
	
	return PLUGIN_CONTINUE;
}

public Event_ObjTeam() {
	
	if( get_cvar_num("amx_sound_events") < 1 ) {
		
		return PLUGIN_CONTINUE
	}
	
	
	new arg[64];
	read_logargv(3, arg, 63)
	
	if(equal(arg, "Target_Bombed")) {
		
		new i
		
		for( i = 1; i < get_maxplayers(); i++ ) {
			
			if( !is_user_connected(i) ) continue
			
			new CsTeams:team = cs_get_user_team(i)
			
			if( team == CS_TEAM_T ) {
				
				client_cmd(i, "spk ^"events/task_complete.wav^" " )
				
				if( get_cvar_num("amx_sound_notify") > 0 ) {
					
					client_print(i, print_chat, "" )
				}
			}
		}
	}
	
	else if(equal(arg, "Target_Saved")) {  
		
		new i
		
		for( i = 1; i < get_maxplayers(); i++ ) {
			
			if( !is_user_connected(i) ) continue
			
			new CsTeams:team = cs_get_user_team(i)
			
			if( team == CS_TEAM_CT ) {
				
				client_cmd(i, "spk ^"events/task_complete.wav^" " )
				
				if( get_cvar_num("amx_sound_notify") > 0 ) {
					
					client_print(i, print_chat, "" )
				}
			}
		}
		
	}
	
	else if(equal(arg, "VIP_Not_Escaped")) {
		
		new i
		
		for( i = 1; i < get_maxplayers(); i++ ) {
			
			if( !is_user_connected(i) ) continue
			
			new CsTeams:team = cs_get_user_team(i)
			
			if( team == CS_TEAM_T ) {
				
				client_cmd(i, "spk ^"events/task_complete.wav^" " )
				
				if( get_cvar_num("amx_sound_notify") > 0 ) {
					
					client_print(i, print_chat, "" )
				}
			}
		}
		
		
	}
	
	else if(equal(arg, "Hostages_Not_Rescued")) {
		
		new i
		
		for( i = 1; i < get_maxplayers(); i++ ) {
			
			if( !is_user_connected(i) ) continue
			
			new CsTeams:team = cs_get_user_team(i)
			
			if( team == CS_TEAM_T ) {
				
				client_cmd(i, "spk ^"events/task_complete.wav^" " )
				
				if( get_cvar_num("amx_sound_notify") > 0 ) {
					
					client_print(i, print_chat, "" )
				}
			}
		}
		
	}
	
	else if(equal(arg, "All_Hostages_Rescued")) {
		
		new i
		
		for( i = 1; i < get_maxplayers(); i++ ) {
			
			if( !is_user_connected(i) ) continue
			
			new CsTeams:team = cs_get_user_team(i)
			
			if( team == CS_TEAM_CT ) {
				
				client_cmd(i, "spk ^"events/task_complete.wav^" " )
				
				if( get_cvar_num("amx_sound_notify") > 0 ) {
					
					client_print(i, print_chat, "" )
				}
			}
		}
		
	}
	
	return PLUGIN_CONTINUE;
}
Last edited by Radu eXtream on 15 Feb 2019, 10:33, edited 1 time in total.
Reason: A fost înlocuit code cu sursă.
RoyalServer 2
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

16 Feb 2019, 18:42

nu afișează mesaje pentru colorare
sunetele se pot schimba
Last edited by levin on 16 Feb 2019, 22:00, edited 1 time in total.
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
User avatar
Laurentiu P.
Fost moderator
Fost moderator
Posts: 2549
Joined: 10 Jul 2013, 21:26
Detinator Steam: Da
Reputatie: Fost super moderator
Fond eXtream: 100
Has thanked: 26 times
Been thanked: 62 times
Contact:

16 Feb 2019, 21:11

Tot ce ai in plugin legat de mesaje

Code: Select all

client_print(i, print_chat, "" )
Fara niciun text nimic.
no...
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests