Raised This Month: $51 Target: $400
 12% 

Winning Team Restriction


Post New Thread Reply   
 
Thread Tools Display Modes
sidjamesbond
Member
Join Date: Oct 2008
Old 02-12-2011 , 20:42   Re: Winning Team Restriction
Reply With Quote #21

Hi, I am having having trouble getting the plugin to work. hopefully you can identify what my problem is. below is the restrict plugin im using with it. when i type wtrestrict_status it shows its registering as "its working but does not restrict anything.
"[wt_restrict] ct score 6, restriction 1, t score 0,"
any ideas for me to start trouble shooting? thanks, Rob



Quote:
Originally Posted by Laplace View Post
Hi,
no it should not be dis-approved because it works fine together with the weapon restrict plugin.

Best Regards,
Laplace
sidjamesbond is offline
red!
Senior Member
Join Date: Sep 2007
Location: Germany
Old 02-14-2011 , 18:33   Re: Winning Team Restriction
Reply With Quote #22

Obviously the plugin is up and running. Most likely the restriction commands you configured do not work as they should. Maybe you should test them isolated from this plugin.
red! is offline
sidjamesbond
Member
Join Date: Oct 2008
Old 02-20-2011 , 02:31   Re: Winning Team Restriction
Reply With Quote #23

Quote:
Originally Posted by red! View Post

For those who need it clear: ITS NOT A STANDALONE PLUGIN, IT NEEDS ANOTHER PLUGIN TO WORK. (I do not appreciate do do the same work twice)
How do i test it alone if it takes another plugin to work? I am not very smart when it comes to this stuff. like i said typing the tr status command shows the spread and restriction 1 for the right team, I have the cvars in my server.cfg file

sm_wt_restrict_enable 1
sm_wt_offset 3
sm_restrict_cmd_unrestrict_all "sm_unrestrict all"
sm_restrict_cmd_t "sm_restrict item team t awp g3sg1 sg550"
sm_restrict_cmd_ct "sm_restrict item team ct awp g3sg1 sg550"
sm_unrestrict_cmd_t "sm_unrestrict item team t awp g3sg1 sg550"
sm_unrestrict_cmd_ct "sm_unrestrict item team ct awp g3sg1 sg550"

i also took off zblock just to make sure that was not messing with it. no KAC. just throwing knives

any advice on how to test alone?
sidjamesbond is offline
Laplace
SourceMod Donor
Join Date: Aug 2010
Location: Germany
Old 02-27-2011 , 04:33   Re: Winning Team Restriction
Reply With Quote #24

Hello sidjamesbond,

I had the same probs at the beginning. Do you use the above mentioned weapon_restrict plugin? then your syntax is wrong.

I configured wt restrict as follows (valid for weapon_restrict plugin):

Code:

// This file was auto-generated by SourceMod (v1.3.4)
// ConVars for plugin "wt_restrict.smx"
 
// -
// Default: ""
sm_restrict_cmd_ct "sm_restrict_awp_ct 0;sm_restrict_sg550_ct 0"
// -
// Default: ""
sm_restrict_cmd_t "sm_restrict_awp_t 0;sm_restrict_g3sg1_t 0"
// -
// Default: ""
sm_restrict_cmd_unrestrict_all "sm_restrict_awp_t 1;sm_restrict_awp_ct 1;sm_restrict_sg550_ct 1;sm_restrict_g3sg1_t 1"
// -
// Default: ""
sm_unrestrict_cmd_ct "sm_restrict_awp_ct 1;sm_restrict_sg550_ct 1"
// -
// Default: ""
sm_unrestrict_cmd_t "sm_restrict_awp_t 1;sm_restrict_g3sg1_t 1"
// -
// Default: "0"
sm_wt_offset "4"
// -
// Default: "1"
sm_wt_restrict_enable "1"
// Version of [HANSE] WT-Restrict
// -
// Default: "1.0.4"
wt_restrict_version "1.0.4"
... you can put the restrict and unrestrict strings into the sourcemod.cfg file or (I preffer this) modify the source code of the wt_restrict plugin in line 74 the following statement:

Code:

AutoExecConfig(true, "plugin.wt_restrict");
.. then compile again and a config file will be created after restart / reload. You can put then the restrict and unrestrict commands into this file.

Best Regards,
Laplace
Laplace is offline
Send a message via ICQ to Laplace
sidjamesbond
Member
Join Date: Oct 2008
Old 02-28-2011 , 05:06   Re: Winning Team Restriction
Reply With Quote #25

thank you very much for the reply, i changed the SM cfg file because i do not know how to edit a .smx file. the server is currently empty so i can not test it out at the moment. thank you very much for the help! Rob
sidjamesbond is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 03-28-2011 , 19:28   Re: Winning Team Restriction
Reply With Quote #26

I use this Weapon Restrict with the following configs in my sourcemod.cfg file:

Code:
///////
/////// Winning Team Restrict with Weapon Restrict
///////

// Default: ""
sm_restrict_cmd_ct "sm_restrict awp 0 ct;sm_restrict sg550 0 ct;sm_restrict g3sg1 0 ct;sm_cash t 8000;sm_csay Snipers Restricted for Counter Terrorists;sm_say CTs are DOMINATING, AWPs/Autos are restricted;sm_say Terrorists cash is set to $8,000!!  They can buy weapons, watch out!!;sm_say Snipers are restricted for Counter Terrorists;sm_say If a CT has a restricted weapon, it will be removed and money refunded"
// -
// Default: ""
sm_restrict_cmd_t "sm_restrict awp 0 t;sm_restrict sg550 0 t;sm_restrict g3sg1 0 t;sm_cash ct 8000;sm_csay Snipers Restricted for Terrorists;sm_say Ts are DOMINATING, AWPs/Autos are restricted;sm_say Counter Terrorist's cash is set to $8,000!!  They can buy weapons, watch out!!;sm_say If a Terrorist has a restricted weapon, it will be removed and money refunded"
// -
// Default: ""
sm_restrict_cmd_unrestrict_all "sm_restrict awp 2 t;sm_restrict awp 2 ct;sm_restrict sg550 2 ct;sm_restrict sg550 2 t;sm_restrict g3sg1 2 t;sm_restrict g3sg1 2 ct;sm_say AWPs and Autos are restricted to 2 per team!!"
// -
// Default: ""
sm_unrestrict_cmd_ct "sm_restrict awp 2 ct;sm_restrict sg550 2 ct;sm_restrict g3sg1 2 ct;sm_csay Snipers UnRestricted for CTs;sm_csay Snipers UnRestricted for CTs;sm_say Snipers UnRestricted for Counter Terrorists;sm_say Snipers UnRestricted for Counter Terrorists"
// -
// Default: ""
sm_unrestrict_cmd_t "sm_restrict awp 2 t;sm_restrict sg550 2 t;sm_restrict g3sg1 2 t;sm_csay Snipers UnRestricted for Ts;sm_csay Snipers UnRestricted for Ts;sm_say Snipers UnRestricted for Terrorists;sm_say Snipers UnRestricted for Terrorists"
// -
// Default: "0"
sm_wt_offset "4"
// -
// Default: "1"
sm_wt_restrict_enable "1"
// Version of [HANSE] WT-Restrict
// -
// Default: "1.0.4"
wt_restrict_version "1.0.4"
I also use the SmCash plugin.

I've tested this and it works like a charm. Only thing, I think my command is too long because the last sm_say doesn't execute.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-23-2011 , 19:26   Re: Winning Team Restriction
Reply With Quote #27

Any update as to why it won't fully execute the sm_restrict_cmd_t? It only executes about half of it.

Here's what I have set for sm_restrict_cmd_t
Code:
///////
/////// Winning Team Restrict with Weapon Restrict
///////

// Default: ""
sm_restrict_cmd_ct "sm_restrict awp 0 ct;sm_restrict sg550 0 ct;sm_restrict g3sg1 0 ct;sm_cash @t +4500;sm_say Counter Terrorists are winning by 5, AWPs & AUTOs are restricted for CTs;sm_say Snipers are restricted for Counter Terrorists"
// -
// Default: ""
sm_restrict_cmd_t "sm_restrict awp 0 t;sm_restrict sg550 0 t;sm_restrict g3sg1 0 t;sm_cash @ct +4500;sm_say Terrorists are winning by 5, AWPs & AUTOs are RESTRICTED for Ts;sm_say Snipers are RESTRICTED for Terrorists"
// -
// Default: ""
sm_restrict_cmd_unrestrict_all "sm_restrict awp 2 t;sm_restrict awp 2 ct;sm_restrict sg550 2 ct;sm_restrict sg550 2 t;sm_restrict g3sg1 2 t;sm_restrict g3sg1 2 ct"
// -
// Default: ""
sm_unrestrict_cmd_ct "sm_restrict awp 2 ct;sm_restrict sg550 2 ct;sm_restrict g3sg1 2 ct;sm_say Snipers UnRestricted for Counter Terrorists;sm_say Snipers UnRestricted for Counter Terrorists"
// -
// Default: ""
sm_unrestrict_cmd_t "sm_restrict awp 2 t;sm_restrict sg550 2 t;sm_restrict g3sg1 2 t;sm_say AWPs & AUTOs are UnRestricted for Terrorists;sm_say AWPs & AUTOs are UnRestricted for Terrorists"
// -
// Default: "0"
sm_wt_offset "4"
// -
// Default: "1"
sm_wt_restrict_enable "1"
// Version of [HANSE] WT-Restrict
// -
// Default: "1.0.4"
wt_restrict_version "1.0.4"
Here's the outcome of it:
[SM] Console set cash of Player1 to $6650 [+4500]
[SM] Console set cash of Player2 to $9500 [+4500]
[SM] Console restricted awp to 0 for t
[SM] Console restricted sg550 to 0 for t
[SM] Console restricted g3sg1 to 0 for t
(ALL) Console: Terrorists are winning by 5, AWPs & AU

Last edited by TnTSCS; 04-23-2011 at 19:28.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-23-2011 , 19:28   Re: Winning Team Restriction
Reply With Quote #28

hmm... I think I found it - I took a look at the .sp and saw that you limit the sm_restrict_cmd_t to 128 where you allow 256 for the ct.

I guess I'll try my hand at modifying it and recompiling... then I'll test and let you know


...:: TnT Edit::...

Successfully edited... here's the fixed version.
I changed the version from 1.0.4 to 1.0.4a

Here's what it was:
Code:
set_T_restriction(bool:restrict)
{
	new String:cmd[256];
	if (restricted_T!=restrict) 
	{
		restricted_T=restrict;
		
		if (restrict)
		{
			// call sm_restrict_cmd_t
			GetConVarString(sm_restrict_cmd_t, cmd, 128);
			//PrintToServer("[wt_restrict] exec: %s", cmd);
			ServerCommand("%s", cmd);
		} 
		else 
		{
			// call sm_unrestrict_cmd_t
			GetConVarString(sm_unrestrict_cmd_t, cmd, 128);
			//PrintToServer("[wt_restrict] exec: %s", cmd);
			ServerCommand("%s", cmd);
		}
	}
}
Here's what it is:
Code:
set_T_restriction(bool:restrict)
{
	new String:cmd[256];
	if (restricted_T!=restrict) 
	{
		restricted_T=restrict;
		
		if (restrict)
		{
			// call sm_restrict_cmd_t
			GetConVarString(sm_restrict_cmd_t, cmd, 256);
			//PrintToServer("[wt_restrict] exec: %s", cmd);
			ServerCommand("%s", cmd);
		} 
		else 
		{
			// call sm_unrestrict_cmd_t
			GetConVarString(sm_unrestrict_cmd_t, cmd, 256);
			//PrintToServer("[wt_restrict] exec: %s", cmd);
			ServerCommand("%s", cmd);
		}
	}
}
Attached Files
File Type: smx wt_restrict.smx (3.5 KB, 132 views)
File Type: sp Get Plugin or Get Source (wt_restrict.sp - 295 views - 4.9 KB)

Last edited by TnTSCS; 04-25-2011 at 12:19.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-25-2011 , 12:15   Re: Winning Team Restriction
Reply With Quote #29

I think that the Winning Team Restrict could be enhanced to include a variable to allow the execution of a set of commands (similar to sm_restrict_cmd_ct/t) if 1/2 of a "blowout" limit is reached.

For example, add cvar to set the "blowout" limit. Say sm_restrict_blowout is set to 10, what that means is if a team is winning by 10 rounds it ends the map and forces the game to go to the next map.
If 1/2 of that blowout is reached it executes sm_restrict_cmd_blowout_ct/t, which admin could make whatever they wanted (pay loosing team, execute a scrample teams, whatever).

Example cvars:
sm_restrict_blowout 10 // (0-disable, number) If a team is winning by this number of rounds the map will end, and the next queued map will be executed
sm_restrict_cmd_blowout_ct "Command1;Command2" // Command to activate restrictions on Counter-Terrorist team (executed only once per map)
sm_restrict_cmd_blowout_t "Command1;Command2" // Command to activate restrictions on Terrorist team (executed only once per map)
TnTSCS is offline
ougogo
Member
Join Date: Jul 2010
Old 04-25-2011 , 13:23   Re: Winning Team Restriction
Reply With Quote #30

Hello,

being French, I do not really understand the use of this plugin.


Could I use it to restrict all weapons except the knife to the team that lost the round? That is to say from the time they lose and when the next round begins.


Sincerely,

Hugo
ougogo is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode