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
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
/\__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)






Germany
Logged

United States

Canada