Cerere modificare[rezolvat!]

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
R1cko
Membru, skill +1
Membru, skill +1
Posts: 475
Joined: 10 Sep 2008, 22:36
Detinator Steam: Da
Detinator server CS: hns.aznet.ro
SteamID: r1cko_hd
Reputatie: Restrictie mesaje private !
Location: Iasi
Has thanked: 37 times
Been thanked: 20 times

02 Nov 2009, 16:59

Deci am pus pe server pluginul Team flash snitch.As vrea daca se poate va rog frumos sa faceti in asa fel incat daca dau flash unui coechipier sa dea 1 slap / daca dau flash la 2 sa dea 2 slap / daca dau la 3 coechipieri sa dea 3 slap.
Sma | Afiseaza codul
/* 
*  Team Flash Snitch
*
*  Author: Tender 
*  email: [email protected]
*  web:  http://www.paike.org
*  irc:  #paike @ quakenet
* 
* Description:
*  When teamflashed, this plugin announces who flashed you. The teamflasher
*  hears a "I'm blind" an gets a message of who he flashed.
*  It is also displayed for admins if someone is fully teamflashed.
*  Tested on Counter-Strike and Condition Zero servers.
*  This does NOT work for 100%...  but almost :-)
*
* Cvars:
*  
*  tfs_adminchat, default 1
*  0 - admins will not be aware
*  1 - admins gets an adminchat of who flashed who
*  
*  tfs_sound: Teamflasher hears "I'm blind!", default 1
*  0 - Sound Off
*  1 - Sound On
* 	
*  
* Changelog: 
*  1.1  - fixed bug: more than one player can get a message from the same teamflash event
*         new cvar: tfs_adminchat (2007-11-04)
*  1.0  - sound on/off cvar: tfs_sound 1/0 (2006-04-14)
*  0.3  - fixed bug: dead spectators will nog get message about teamflash (2006-03-16)
*  0.2  - changed flash owner code, a timer is added, "[Team Flash Snitch]" in green text (2006-03-12)
*  0.1  - initial release (2006-01-25)
*
* Credits:
*  Johnny got hes gun, his plugin "Blind" helped me writing this.
*  http://www.paike.org for testing this plugin on paike servers
*/ 

#include <amxmodx> 
#include <fakemeta> 

#define TEMPENTITY	"23"
#define BLINDED_FULLY	255
#define BLINDED_PARTLY	200 

new const TFSVERSION[] = "1.1"
new Float:FLASH_TIMER = 1.52	// Time from throwing a FB to the bang (1.52 seconds?)
new g_flasher = 0 		// id of the flasher


public plugin_init() { 
	register_plugin("Team Flash Snitch",TFSVERSION,"Tender")
	
	register_cvar("tfs_sound","1")
	register_cvar("tfs_adminchat","1")
	
	register_event("ScreenFade", "event_blinded", "be", "4=255", "5=255", "6=255", "7>199") 
	register_event(TEMPENTITY, "event_flashsmokepuff", "a", "1=5", "6=25", "7=6") 
	register_forward(FM_SetModel, "forward_setmodel") 
} 

public plugin_precache() {
	precache_sound ("radio/bot/im_blind.wav") 
	return PLUGIN_CONTINUE 
}



public event_blinded(const ID) { // someone got flashed
     
	new alpha = read_data(7) 
	if (alpha != BLINDED_FULLY && alpha != BLINDED_PARTLY || !is_user_alive(ID)) 
		return PLUGIN_CONTINUE 
	if(get_user_team(ID) == get_user_team(g_flasher) && ID != g_flasher){
		new message1[128], message2[128]
		new flasher[32], name[32] 
		get_user_name(g_flasher, flasher, 31) 
		get_user_name(ID, name, 31) 
		format(message1, 127, "^x04[ GSZone ] ^x01 You´ve been teamflashed by %s", flasher)	
		format(message2, 127, "^x04[ GSZone ] ^x01 You %sflashed a teammate (%s)", alpha == BLINDED_FULLY ? "totally " : "", name)
		colored_msg(ID,message1)
		colored_msg(g_flasher,message2)
		if(get_cvar_num("tfs_sound")>0) client_cmd(g_flasher,"spk sound/radio/bot/im_blind.wav")
		if(alpha == BLINDED_FULLY && get_cvar_num("tfs_adminchat")) server_cmd("amx_chat [ GSZone ] %s flashed a teammate (%s)",flasher,name)
	}
	return PLUGIN_CONTINUE 
} 


public colored_msg(id,msg[]) { 
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

public event_flashsmokepuff() { // a flash has banged

	set_task(0.05,"reset_flasher") // wait until all is announced
	return PLUGIN_CONTINUE
} 

public reset_flasher(){ 
	g_flasher = 0	// clear g_flasher
}


public get_flasher(id){ // a flash is about to bang
	g_flasher = (id - 524627)
}


public forward_setmodel(const ENTITY, model[]) { // a flash is thrown
	
	if (!equal(model, "models/w_flashbang.mdl")) 
		return FMRES_IGNORED 

	new owner = pev(ENTITY, pev_owner)
	if (owner == 0) 
		return FMRES_IGNORED 

	set_task(FLASH_TIMER,"get_flasher", 524627+owner)
   
	return FMRES_IGNORED 
} 


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1053\\ f0\\ fs16 \n\\ par }
*/
As mai vrea sa stiu cum fac sa mearga si amx_ban .. ca atunci cand dau ban cu amx_ban tot poate intra .. si mi-e lene sa dau doar cu banip
Image
RoyalServer 2
User avatar
R1cko
Membru, skill +1
Membru, skill +1
Posts: 475
Joined: 10 Sep 2008, 22:36
Detinator Steam: Da
Detinator server CS: hns.aznet.ro
SteamID: r1cko_hd
Reputatie: Restrictie mesaje private !
Location: Iasi
Has thanked: 37 times
Been thanked: 20 times

03 Nov 2009, 16:37

Ma puteti ajuta ??
Image
User avatar
Ciprian
Fost administrator
Fost administrator
Posts: 5172
Joined: 10 May 2008, 21:29
Detinator Steam: Da
CS Status: ^^
SteamID: crazycipry
Reputatie: Fost administrator
Fost Scripter eXtreamCS
Fost Supervizor CS.eXtreamCS.com
Fost Unbanner ZM.eXtreamCS.com
Fost Contribuitor
Nume anterior: crazy.cipry
Location: Baia Mare
Has thanked: 177 times
Been thanked: 405 times

03 Nov 2009, 16:39

Mutat in Programare CS - Pluginuri!
User avatar
R1cko
Membru, skill +1
Membru, skill +1
Posts: 475
Joined: 10 Sep 2008, 22:36
Detinator Steam: Da
Detinator server CS: hns.aznet.ro
SteamID: r1cko_hd
Reputatie: Restrictie mesaje private !
Location: Iasi
Has thanked: 37 times
Been thanked: 20 times

04 Nov 2009, 19:59

Se poate va rog ?
Image
PoSiTiOn Of PoWeR
Utilizator banat
Utilizator banat
Posts: 2467
Joined: 28 Oct 2007, 12:18
Detinator Steam: Nu
Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
Has thanked: 4 times
Been thanked: 116 times

05 Nov 2009, 19:58

->
| Afiseaza codul
#include <amxmodx> 
#include <fakemeta> 

#define FLASED_1 1
#define FLASED_2 2
#define FLASED_3 3

#define TEMPENTITY	"23"
#define BLINDED_FULLY	255
#define BLINDED_PARTLY	200 

new const TFSVERSION[] = "1.1"
new Float:FLASH_TIMER = 1.52	// Time from throwing a FB to the bang (1.52 seconds?)
new g_flasher = 0 		// id of the flasher
new g_id[33]

public plugin_init() { 
	register_plugin("Team Flash Snitch",TFSVERSION,"Tender")
	
	register_cvar("tfs_sound","1")
	register_cvar("tfs_adminchat","1")
	
	register_event("ScreenFade", "event_blinded", "be", "4=255", "5=255", "6=255", "7>199") 
	register_event(TEMPENTITY, "event_flashsmokepuff", "a", "1=5", "6=25", "7=6") 
	register_forward(FM_SetModel, "forward_setmodel")
} 

public plugin_precache() {
	precache_sound ("radio/bot/im_blind.wav") 
	return PLUGIN_CONTINUE 
}



public event_blinded(const ID) { // someone got flashed
     
	new alpha = read_data(7) 
	if (alpha != BLINDED_FULLY && alpha != BLINDED_PARTLY || !is_user_alive(ID)) 
		return PLUGIN_CONTINUE

	if(get_user_team(ID) == get_user_team(g_flasher) && ID != g_flasher)
	{
		new message1[128], message2[128]
		new flasher[32], name[32]
		get_user_name(g_flasher, flasher, 31) 
		get_user_name(ID, name, 31) 
		format(message1, 127, "^x04[ GSZone ] ^x01 You´ve been teamflashed by %s", flasher)	
		format(message2, 127, "^x04[ GSZone ] ^x01 You %sflashed a teammate (%s)", alpha == BLINDED_FULLY ? "totally " : "", name)
		colored_msg(ID,message1)
		colored_msg(g_flasher,message2)
		if(get_cvar_num("tfs_sound")>0) client_cmd(g_flasher,"spk sound/radio/bot/im_blind.wav")
		if(alpha == BLINDED_FULLY && get_cvar_num("tfs_adminchat")) server_cmd("amx_chat [ GSZone ] %s flashed a teammate (%s)",flasher,name)
		
		g_id[ID]++
		switch (g_id[ID])
		{
			case 1: user_slap(g_flasher, FLASED_1)
			case 2: user_slap(g_flasher, FLASED_2)
			case 3: user_slap(g_flasher, FLASED_3)
		}
		g_id[ID]= 0
		
	}
	return PLUGIN_CONTINUE 
} 
	
public colored_msg(id,msg[]) { 
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

public event_flashsmokepuff() { // a flash has banged

	set_task(0.05,"reset_flasher") // wait until all is announced
	return PLUGIN_CONTINUE
} 

public reset_flasher(){ 
	g_flasher = 0	// clear g_flasher
}


public get_flasher(id){ // a flash is about to bang
	g_flasher = (id - 524627)
}


public forward_setmodel(const ENTITY, model[]) { // a flash is thrown
	
	if (!equal(model, "models/w_flashbang.mdl")) 
		return FMRES_IGNORED 

	new owner = pev(ENTITY, pev_owner)
	if (owner == 0) 
		return FMRES_IGNORED 

	set_task(FLASH_TIMER,"get_flasher", 524627+owner)
   
	return FMRES_IGNORED 
}
ai modifici valorile (cei cu rosu)
#define FLASED_1 1
#define FLASED_2 2
#define FLASED_3 3
User avatar
R1cko
Membru, skill +1
Membru, skill +1
Posts: 475
Joined: 10 Sep 2008, 22:36
Detinator Steam: Da
Detinator server CS: hns.aznet.ro
SteamID: r1cko_hd
Reputatie: Restrictie mesaje private !
Location: Iasi
Has thanked: 37 times
Been thanked: 20 times

06 Nov 2009, 14:29

Off cand credeam ca e gata :( .. Error la compilare

Your plugin failed to compile! Read the errors below:


754624 successful compiles to date.
535273 failed compiles to date.
Old compiler: 101980 compiles before decommission.
This tool by: David "BAILOPAN" Anderson.
Image
PoSiTiOn Of PoWeR
Utilizator banat
Utilizator banat
Posts: 2467
Joined: 28 Oct 2007, 12:18
Detinator Steam: Nu
Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
Has thanked: 4 times
Been thanked: 116 times

06 Nov 2009, 14:55

vezi daca ai copiat bine code-ul sau compileaza la tine in pc
User avatar
R1cko
Membru, skill +1
Membru, skill +1
Posts: 475
Joined: 10 Sep 2008, 22:36
Detinator Steam: Da
Detinator server CS: hns.aznet.ro
SteamID: r1cko_hd
Reputatie: Restrictie mesaje private !
Location: Iasi
Has thanked: 37 times
Been thanked: 20 times

06 Nov 2009, 16:16

Doamne Aline :X din nou m`ai salvat merge exact .. da exact cum voiam :X

Thx again
Image
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests