Cerere 2 pluginuri (functionale)

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Armoda
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 24 Aug 2010, 15:31
Detinator Steam: Nu
CS Status: Invat domne`
Detinator server CS: Iasi.CSWorld.Ro
Contact:

05 Sep 2010, 17:50

As dori si eu 2 pluginuri , cum am zis si in titlu "functionale" , zic asa pentru ca am mai facut niste cereri si imi dadeau baietii numai pluginuri nefunctionale , aici il rog frumos pe Ciprian daca are timp sa m-i le faca si mie !

1.) Un amx_gag cat mai simplu , adica playerul nu poate vorbi nici pe say_team , gagul sa fie de 10 minute , cand este executata comanda de admin sa apara in chat doar atat : Admin x : I-a dat gag jucatorului y pentru 10 minute ( Fix atat , nimic in plus cu voicecomm si altele) , cand jucatorul tasteaza in chat dupa ca a luat gag sa i se afiseze : Ai primit gag pentru limbaj inadecvat , cand jucatorul iese de pe server sa scrie in chat pentru toti : Jucatorul cu gag (x) a iesit de pe server ! Numele playerului cu gag sa ramana acelasi sa nu i se puna alt nume , comanda adminului sa fie : amx_gag nume (atat) !
2.) Un amx_ct/t/spec care sa cuprinda : Imunitate pentru admini , cand jucatorul este la tero si un admin incearca sa il mute tot la tero sa ii zica in chat : Jucatorul este deja la echipa terorist ! Asa si cand este la spec si ct ! Sa se afiseze in chat : Admin x : L-a mutat pe y la CT !


Multumesc frumos (Ciprian) sau alt/i priceput/i , va dau + multumesc daca va ajuta la ceva :( ?!
RoyalServer 2
Armoda
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 24 Aug 2010, 15:31
Detinator Steam: Nu
CS Status: Invat domne`
Detinator server CS: Iasi.CSWorld.Ro
Contact:

07 Sep 2010, 22:28

Ma ajuta si pe mine cineva :( (Ciprian , te rog frumos) ....
Armoda
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 24 Aug 2010, 15:31
Detinator Steam: Nu
CS Status: Invat domne`
Detinator server CS: Iasi.CSWorld.Ro
Contact:

08 Sep 2010, 11:29

Hai fratii mei priceputi , nici unu` nu ma ajuta , am cerut ceva chiar atat de greu :( ?
User avatar
niku-leonard
Membru, skill 0
Membru, skill 0
Posts: 97
Joined: 23 Jul 2010, 03:18
Detinator Steam: Da
Detinator server CS: csgo.darkarena.ro
SteamID: STEAM_0:1:41693762
Has thanked: 4 times
Been thanked: 2 times
Contact:

08 Sep 2010, 20:00

| Afiseaza codul
#define VoiceCommMute 1		// 0 = Disabled ( no extra module required ) | 1 = Voicecomm muteing enabled. ( requires engine module)
#define BlockNameChange 1	// 0 = Disabled | 1 = Block namechange on gagged clients
#define LogAdminActions 1	// 0 = Disabled | 1 = Admin actions will be logged
#define DefaultGagTime 600.0	// The std gag time if no other time was entered. ( this is 10 min ), Remember the value MUST contain a .0
#define PlaySound 1		// 0 = Disabled | 1 = Play a sound to gagged clients when their trying to talk
#define GagReason 1		// 0 = Disabled | 1 = Gagged clients can see why there where gagged when they try to talk
#define MaxPlayers 32
#define AllowOtherPlugin2Interface 1

#include <amxmodx>
#include <amxmisc>
#include <engine>

new g_GagPlayers[MaxPlayers+1]	// Used to check if a player is gagged
#if GagReason == 1
new gs_GagReason[MaxPlayers+1][48]
#endif

public plugin_init() 
{ 
	register_plugin("Admin Gag","1.8.3","Baross") 
	register_clcmd("say","block_gagged") 
	register_clcmd("say_team","block_gagged") 
	register_concmd("amx_gag","CMD_GagPlayer",ADMIN_KICK,"<nick or #userid> <a|b|c> <time>") 
	register_concmd("amx_ungag","CMD_UnGagPlayer",ADMIN_KICK,"<nick or #userid>") 
} 

public block_gagged(id){  // This function is what check the say / team_say messages & block them if the client is blocked.
	if(!g_GagPlayers[id]) return PLUGIN_CONTINUE // Is true if the client is NOT blocked.
	new cmd[5] 
	read_argv(0,cmd,4) 
	if ( cmd[3] == '_' )
		{ 
		if (g_GagPlayers[id] & 2){ 
#if GagReason == 1
			client_print(id,print_chat,"* Ai primit gag din urmatorul motiv: %s",gs_GagReason[id]) 
#else
			client_print(id,print_chat,"* Ai primit gag") 
#endif

#if PlaySound == 1
			client_cmd(id,"spk barney/youtalkmuch")
#endif
			return PLUGIN_HANDLED 
			} 
		} 
	else if (g_GagPlayers[id] & 1)   { 
#if GagReason == 1
			client_print(id,print_chat,"* Ai primit gag din urmatorul motiv: %s",gs_GagReason[id]) 
#else
			client_print(id,print_chat,"* Ai primit gag") 
#endif
#if PlaySound == 1
			client_cmd(id,"spk barney/youtalkmuch")
#endif
		return PLUGIN_HANDLED 
		} 
	return PLUGIN_CONTINUE 
	} 
public CMD_GagPlayer(id,level,cid) 
{ 
	if(!cmd_access (id,level,cid,1)) return PLUGIN_HANDLED
	new arg[32],VictimID
	
	read_argv(1,arg,31)  			// Arg contains Targets nick or Userid
	VictimID = cmd_target(id,arg,8)		// This code here tryes to find out the player index. Either from a nick or #userid
	if ((get_user_flags(VictimID) & ADMIN_IMMUNITY) && VictimID != id || !cmd_access (id,level,cid,2) ) { return PLUGIN_HANDLED; } // This code is kind of "long", its job is to. Stop actions against admins with immunity, Stop actions action if the user lacks access, or is a bot/hltv
	new s_Flags[4],VictimName[32],AdminName[32],flags,ShowFlags[32],CountFlags,s_GagTime[8],Float:f_GagTime

	read_argv(2,arg,31) 
	if (!arg[0]) // This means amx_gag <nick / userid> and no other flag or time was used.
	{
		f_GagTime = DefaultGagTime
		format(s_Flags,7,"abc")
	}
	else
	{
		if(contain(arg,"m")!=-1 && contain(arg,"!")==-1) // This means the time was entered in minuts and not seconds
		{
			copyc(s_GagTime,7,arg, 'm')
			f_GagTime = floatstr(s_GagTime) * 60
		}
		else if(isdigit(arg[0])&& contain(arg,"!")==-1) // The value was entered in seconds
		{
			format(s_GagTime,7,arg)
			f_GagTime = floatstr(s_GagTime)
		}
		read_argv(3,arg,8)
		if (!arg[0])	// No flag has been entered
			format(s_Flags,7,"abc")
		else if(contain(arg,"!")==-1)		// This means that arg did NOT contain the ! symbot
			format(s_Flags,7,arg)
		else if(contain(arg,"!")!=-1)		// This means that arg did DOES contain the ! symbot
			format(s_Flags,7,"abc")
		if (f_GagTime == 0.0)
		{
			read_argv(2,arg,8)
			if(contain(arg,"!")!=-1)
				format(s_Flags,3,"abc") // Flag was entered.
			else
				format(s_Flags,3,arg) // Flag was entered.
			f_GagTime = DefaultGagTime
		}
#if GagReason == 1
		new GagReasonFound=0
		for(new i=2;i<=4;i++)
		{
			read_argv(i,arg,31)
			if(contain(arg,"!")!=-1)
			{	
				read_args(arg,31)
				new tmp[32]
				copyc(tmp,32,arg,33)
				copy(gs_GagReason[VictimID],47,arg[strlen(tmp)+1])
				GagReasonFound = 1
			}
		}
		if(GagReasonFound == 0)	// If no reason was entered, add the std reason.
			format(gs_GagReason[VictimID],47,"Ai primit gag pentru ca nu ai respectat regulile")
#endif
	}

	flags = read_flags(s_Flags) // Converts the string flags ( a,b or c ) into a int
	g_GagPlayers[VictimID] = flags 
#if VoiceCommMute == 1
	if(flags & 4) // This code checks if the c flag was used ( reprisented by the number 4 ), If pressent it mutes his voicecomm.
		set_speak(VictimID, SPEAK_MUTED)
#endif
	new TaskParm[1]		// For some reason set_task requires a array. So i make a array :)
	TaskParm[0] = VictimID
	set_task( f_GagTime,"task_UnGagPlayer",VictimID,TaskParm,1) 

	CountFlags = 0
	if (flags & 1)
	{
		format(ShowFlags,31,"say")
		CountFlags++
	}
	if (flags & 2)
	{
		if(CountFlags)
			format(ShowFlags,31,"%s / say_team",ShowFlags)
		if(!CountFlags)
			format(ShowFlags,31,"say_team")
	}
#if VoiceCommMute != 0
	if(flags & 4)
	{
		if(CountFlags)
			format(ShowFlags,31,"%s / voicecomm",ShowFlags)
		if(!CountFlags)
			format(ShowFlags,31,"voicecomm")		
	}
#endif
	get_user_name(id,AdminName,31)
	get_user_name(VictimID,VictimName,31)
	switch(get_cvar_num("amx_show_activity"))   
	{ 
#if GagReason == 1
		case 2:   client_print(0,print_chat,"ADMIN %s: Ia dat gag lu' %s Pentru %0.0f Minute: %s ( %s )",AdminName,VictimName,(f_GagTime / 60),gs_GagReason[VictimID],ShowFlags) // debug added
   		case 1:   client_print(0,print_chat,"ADMIN: Ia dat gag lu' %s Pentru %0.0f Minute: %s ( %s )",VictimName,(f_GagTime / 60),gs_GagReason[VictimID],ShowFlags) 
#else
		case 2:   client_print(0,print_chat,"ADMIN %s: Ia dat gag lu' %s Pentru %0.0f Minute ( %s )",AdminName,VictimName,(f_GagTime / 60),ShowFlags) // debug added
   		case 1:   client_print(0,print_chat,"ADMIN:  Ia dat gag lu %s Pentru %0.0f Minute ( %s )",VictimName,(f_GagTime / 60),ShowFlags) 
#endif
	 
	 }	
#if LogAdminActions == 1
	new parm[5] /*0 = Victim id | 1 = Admin id | 2 = Used to control if its a gag or Ungag | 3 = The gag flags | 4  = Length of the gag */
	parm[0] = VictimID
	parm[1] = id
	parm[2] = 0
	parm[3] = flags
	parm[4] = floatround(Float:f_GagTime)
	LogAdminAction(parm)
#endif
	return PLUGIN_HANDLED
} 

public CMD_UnGagPlayer(id,level,cid)   /// Removed gagged player ( done via console command )
{
	new arg[32],VictimID
	read_argv(1,arg,31)  			// Arg contains Targets nick
	
	VictimID = cmd_target(id,arg,8)		// This code here tryes to find out the player index. Either from a nick or #userid
	if ((get_user_flags(VictimID) & ADMIN_IMMUNITY) && VictimID != id || !cmd_access (id,level,cid,2) ) { return PLUGIN_HANDLED; } // This code is kind of "long", its job is to. Stop actions against admins with immunity, Stop actions action if the user lacks access, or is a bot/hltv

	new AdminName[32],VictimName[32] 

	get_user_name(id,AdminName,31)		// Gets Admin name
	get_user_name(VictimID,VictimName,31)

	if(!g_GagPlayers[VictimID])		// Checks if player has gagged flag
	{
		console_print(id,"%s Nu are gag si nu ii poti scoate gagu.",arg)
		return PLUGIN_HANDLED
	}
	switch(get_cvar_num("amx_show_activity"))   
	{ 
   		case 2:   client_print(0,print_chat,"ADMIN %s: Ia scos gagul lu' %s",AdminName,VictimName) 
   		case 1:   client_print(0,print_chat,"ADMIN: Ia scos gagul lu' %s",VictimName) 
  	}

#if LogAdminActions == 1
	new parm[3] /*0 = Victim id | 1 = Admin id | 2 = Used to control if its a gag or Ungag | 3 = The gag flags | 4  = Length of the gag */
	parm[0] = VictimID
	parm[1] = id
	parm[2] = 1
	LogAdminAction(parm)
#endif
	remove_task(VictimID)		// Removes the set_task set to ungag the player
	UnGagPlayer(VictimID)		// This is the function that does the actual removal of the gag info
	return PLUGIN_HANDLED
} 

public client_disconnect(id) 
{ 
	if(g_GagPlayers[id]) // Checks if disconnected player is gagged, and removes flags from his id.
	{
		new Nick[32],Authid[35]
		get_user_name(id,Nick,31)
		get_user_authid(id,Authid,34)
		client_print(0,print_chat,"[Justic3hns] Playerul cu gag s-a deconectat ( %s <%s> )",Nick,Authid)
		remove_task(id)		// Removes the set_task set to ungag the player
		UnGagPlayer(id)		// This is the function that does the actual removal of the gag info
	}
}
#if BlockNameChange == 1
public client_infochanged(id)
{
	if(g_GagPlayers[id])
	{
		new newname[32], oldname[32]
		get_user_info(id, "name", newname,31)
		get_user_name(id,oldname,31)
	
		if (!equal(oldname,newname))
		{
			client_print(id,print_chat,"* Playerii cu gag nu isi pot schimba numele")
			set_user_info(id,"name",oldname)
		}
	}
}
#endif
public task_UnGagPlayer(TaskParm[])	// This function is called when the task expires
{
	new VictimName[32]
	get_user_name(TaskParm[0],VictimName,31)
	client_print(0,print_chat,"ADMIN: %s Nu mai are gag",VictimName)
	UnGagPlayer(TaskParm[0])
}
#if LogAdminActions == 1
stock LogAdminAction(parm[]) // This code is what logs the admin actions.
{ 
	new VictimName[32],AdminName[32],AdminAuth[35],VictimAuth[35]
	get_user_name(parm[1],AdminName,31)
	get_user_name(parm[0],VictimName,31)
	get_user_authid(parm[1],AdminAuth,34)
	get_user_authid(parm[0],VictimAuth,34)

#if GagReason == 1
	if(parm[2] == 0)
		log_amx("Gag: ^"%s<%s>^" Ai primit gag %s <%s> for %d ( %d ) Motiv: %s",AdminName,AdminAuth,VictimName,VictimAuth,parm[4],parm[3],gs_GagReason[parm[0]])
#else
	if(parm[2] == 0)
		log_amx("Gag: ^"%s<%s>^" Ai primit gag %s <%s> for %d ( %d )",AdminName,AdminAuth,VictimName,VictimAuth,parm[4],parm[3])
#endif
	if(parm[2] == 1)
		log_amx("UnGag: ^"%s<%s>^" Ti-a scos gagul %s<%s>",AdminName,AdminAuth,VictimName,VictimAuth)
}
#endif
stock UnGagPlayer(id) // This code is what removes the gag.
{ 
#if VoiceCommMute == 1
	if(g_GagPlayers[id] & 4)	// Unmutes the player if he had voicecomm muted.
	{
		if(get_cvar_num("sv_alltalk") == 1)
			set_speak(id, SPEAK_ALL)
		else 
			set_speak(id, SPEAK_NORMAL)
	}
#endif
	g_GagPlayers[id] = 0
#if GagReason == 1
	setc(gs_GagReason[id],31,0)
#endif
}
#if AllowOtherPlugin2Interface == 1
public func_AddGag(id)
{
	g_GagPlayers[id] = 7 
	new TaskParm[1]		// For some reason set_task requires a array. So i make a array :)
	TaskParm[0] = id
#if VoiceCommMute == 1
	set_speak(id, SPEAK_MUTED)
#endif
	set_task( DefaultGagTime,"task_UnGagPlayer",id,TaskParm,1)
}

public func_RemoveGag(id)
{
	remove_task(id)		// Removes the set_task set to ungag the player
	UnGagPlayer(id)
}
#endif
Incearca asta pentru gag

Si

asta pentru jucatori (transfer) :D

Have Fun!
Armoda
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 24 Aug 2010, 15:31
Detinator Steam: Nu
CS Status: Invat domne`
Detinator server CS: Iasi.CSWorld.Ro
Contact:

02 Oct 2010, 16:41

Gasesc erori in logs-uri :(, va rog frumos, ma ajuta vreun scripter priceput ?

Deci cel mai simplu amx_gag, cum am explicat mai sus !

Multumesc anticipat !
S3ekEr^

02 Oct 2010, 20:53

1. Poftim pluginu pentru gag .

http://www.girlshare.ro/1622579.2

2. Poftim .
| Afiseaza codul
include <amxmodx>
#include <amxmisc>
#include <cstrike>

stock const PLUGIN_NAME[]    =   "New AMXX Plugin"
stock const PLUGIN_AUTHOR[]  =   "SAMURAI"
stock const PLUGIN_VERSION[] =   "0.1"

public plugin_init()
{
   register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
   
   register_concmd("amx_ct","cmd_ct",ADMIN_KICK);
   register_concmd("amx_t","cmd_t",ADMIN_KICK);
   
}

public cmd_ct(id,level,cid)
{
   if(!cmd_access(id,level,cid,1))
      return 1;
   
   new arg[32];
   read_argv(id,arg,31);
   
   new target = cmd_target(id,arg,7);
   
   if(!target)
      return 1;
   
   if(cs_get_user_team(target) == CS_TEAM_CT)
   {
      console_print(id,"Este deja la CT");
   }
   else cs_set_user_team(id,CS_TEAM_CT);
   
   new admin_name[32], pname[32];
   get_user_name(id,admin_name,31);
   get_user_name(target,pname,31);
   
   client_print(0,print_chat,"Admin %s l-a mutat pe %s la CT",admin_name,pname);
   
   return 1;
}
      
public cmd_t(id,level,cid)
{
   if(!cmd_access(id,level,cid,1))
      return 1;
   
   new arg[32];
   read_argv(id,arg,31);
   
   new target = cmd_target(id,arg,7);
   
   if(!target)
      return 1;
   
   if(cs_get_user_team(target) == CS_TEAM_T)
   {
      console_print(id,"Este deja la T");
   }
   else cs_set_user_team(id,CS_TEAM_T);
   
   new admin_name[32], pname[32];
   get_user_name(id,admin_name,31);
   get_user_name(target,pname,31);
   
   client_print(0,print_chat,"Admin %s l-a mutat pe %s la T",admin_name,pname);
   
   return 1;
}
Armoda
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 24 Aug 2010, 15:31
Detinator Steam: Nu
CS Status: Invat domne`
Detinator server CS: Iasi.CSWorld.Ro
Contact:

02 Oct 2010, 20:56

Daca vrei sa ajuti, ajuta, dar nu ma lua cu .amxx (pune .sma), si de ce nu am incredere in tine ? De ce am impresia ca e un plugin "varza" ?

Rog ca toti .............. sa nu se mai bage in seama !

Astept vreun scripter sa ma ajute !

Merci frumos :*
S3ekEr^

02 Oct 2010, 21:02

Armoda wrote:Daca vrei sa ajuti, ajuta, dar nu ma lua cu .amxx (pune .sma), si de ce nu am incredere in tine ? De ce am impresia ca e un plugin "varza" ?

Rog ca toti .............. sa nu se mai bage in seama !

Astept vreun scripter sa ma ajute !

Merci frumos :*
Va rog nu va suparați la 2 v-am pus sma iar la primu plugin am doar amxx deoarece pluginu l-am avut pe un server de-al meu si n-am mai gasit sma dar pluginu merge perfect si e cea ce-ați cerut dvs .
Armoda
Membru, skill 0
Membru, skill 0
Posts: 10
Joined: 24 Aug 2010, 15:31
Detinator Steam: Nu
CS Status: Invat domne`
Detinator server CS: Iasi.CSWorld.Ro
Contact:

02 Oct 2010, 21:10

Nu accept "fantome", pare rau !


Scripter treci aici :-w
User avatar
S3ekEr^
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 3475
Joined: 06 Dec 2009, 12:47
Detinator Steam: Nu
Reputatie: Nume anterior: The Seeker , Reptyle
Fost Scripter
Fost super moderator
Utilizator neserios ( tepar )
Has thanked: 117 times
Been thanked: 329 times

03 Oct 2010, 13:58

Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests