Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2008-04-10 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
April 11, 2008, 12:03:16 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: WCS Tournament being opened for applications!

Post here for signups!
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: [Preview] wcs_restrict function in v0.76 [thx Phat_Wizard]  (Read 391 times)
kryptonite
<WCS coder>
Administrator
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 1096



WWW
sp0nk

myServer 85.190.38.232:27015
(Warning: click connects through Steam)
« on: October 02, 2007, 10:47:16 PM »

I want to introduce to a new function called "wcs_restrict"
Phat_Whizard coded this set of functions, thanks a lot for it

It allows you to:
- restrict a single weapon for a player
- allow only one specific weapon for a player
- auto give knife/no knife
- knife (and grenades)
- knife-only

here's the syntax:
Quote
wcs_restrict_purge <userid>

wcs_restrict <userid> restrict <weapon>
wcs_restrict <userid> allow <weapon> <give> <knife>
wcs_restrict <userid> addallow <weapon>
wcs_restrict <userid> knife
wcs_restrict <userid> knifeonly

Some examples (for skills):

Quote
ex1: es wcs_restrict event_var(userid) allow m4a1 1 1 1
/\__This will allow you to use only m4a1, knife and nades. also gives you an m4

ex2: es wcs_restrict event_var(userid) allow ak47 1 0 1
/\__This will allow you to use only ak47 and nades. also gives you an ak

ex3: es wcs_restrict event_var(userid) allow mp5navy 1 1 0
/\__This will allow you to use only mp5navy and knife. also gives you an mp5

ex4: es wcs_restrict event_var(userid) knife
/\__This will allow you to use only knife with nades

ex5: es wcs_restrict event_var(userid) knifeonly
/\__This will allow you to use only knife

ex6: es wcs_restrict event_var(userid) restrict deagle
/\__This will make it so you can NOT use the deagle

it restricts buying and picking up the weapon!

This function will solve some problems like no knife with the Predator race and enables to create weapon-limited races easily.

In addition, it enables some of YOU to code an addon which restricts weapons on special maps like knife_only or scoutmaps eg. scoutzknivez. This would remove the annoying trouble the players have, if eg. archmage uses his casted gun at such a map. If you have interest for coding it, go on or send me a message

PS: this previews are posted to show you "the mod is not dead" 
Good coders can get a preview version if they want, but the script is not yet finished for a release.

edit: added wcs_restrict <userid> addallow <weapon> to allow unrestricting single weapons (eg. for a handgun-only race)
« Last Edit: October 03, 2007, 12:01:48 PM by kryptonite » Logged

(click to show/hide)
=[LSS]= Soldier
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 539


Hi


WWW
Soldier62994
« Reply #1 on: October 02, 2007, 11:42:20 PM »


wcs_restrict <userid> allow <weapon> <give> <knife>

So..in give you would put a 0 for don't give and 1 for give and in knife a 1 for knife and 0 for no knife?...I think


Logged


=[LSS]= NEW Wc3 Server
Phat_Wizard
WCS ESP Dev Team
Level 7 Expert

Offline Offline

Canada Canada

Posts: 207




Phat_Wizard
phatwizard
« Reply #2 on: October 03, 2007, 12:43:23 AM »


wcs_restrict <userid> allow <weapon> <give> <knife>

So..in give you would put a 0 for don't give and 1 for give and in knife a 1 for knife and 0 for no knife?...I think


Ok well since I did code this i guess I shall explain...

wcs_restrict <userid> allow <weapon> <give> <knife>
<userid> : This should be a no brainer.
<weapon> : Any weapon in CS:S without weapon_* eg: ak47
<give> : 0 = you do NOT get the allowed weapon / 1 = you DO get the allowed weapon
<knife> ; 0 = you do NOT get a knife and can't get one / 1 = you DO get to use a knife as well as get one

I hope this helps.
Logged

=[LSS]= Soldier
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 539


Hi


WWW
Soldier62994
« Reply #3 on: October 03, 2007, 12:58:12 AM »

Awesome, so does this go in the cfg  and replaces the normal restrictions or part of the code? and also krypt mentioned grenades, does that come with the knife?
Logged


=[LSS]= NEW Wc3 Server
Phat_Wizard
WCS ESP Dev Team
Level 7 Expert

Offline Offline

Canada Canada

Posts: 207




Phat_Wizard
phatwizard
« Reply #4 on: October 03, 2007, 01:31:54 AM »

This feature is only going to be in WCS 0.76 and is going to be part of the core... the grenades are only restricted with the "knifeonly" sub command, but other than that the grenades will be allowed unless you restrict them. Also these commands make it so easy that all you would have to do is to use one command and it should be all you need unless you want do more then the single command restrictions.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
April 10, 2008, 08:23:54 PM
not really power, there are bad people and there are people who are killing other people, and there are people who are destroying other people.
April 10, 2008, 05:07:31 PM
Who's happy ? ^^
April 10, 2008, 04:45:28 PM
Yea, well be happy that there is still some people whom behave like me... without... the world would be a boring(better) place.... wich sucks...
April 10, 2008, 02:43:59 PM
i'm not serious, i'm just pointing how do you behave (always)
April 10, 2008, 10:16:51 AM
all im doing is keeping an uppy attitude... im trying to look a bit positive at this... you arez teh ones always being negative... yo uguys shouldnt be so F*kin Serious...
April 09, 2008, 08:11:39 PM
thats not positive feedback at all, it is just making that guy more frustrated
April 09, 2008, 04:52:39 PM
you mean "postive feedback"?
Recent
by Jeff
[April 10, 2008, 11:50:15 PM]

[April 10, 2008, 10:48:04 PM]

by Jeff
[April 10, 2008, 08:55:56 PM]

by Jeff
[April 10, 2008, 08:48:07 PM]

[April 10, 2008, 08:10:58 PM]

[April 10, 2008, 07:21:15 PM]

by Jeff
[April 10, 2008, 06:24:17 PM]

[April 10, 2008, 05:37:32 PM]

[April 10, 2008, 05:27:50 PM]

[April 10, 2008, 05:24:58 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.067 seconds with 28 queries.