AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   [WS] Weapon Storage Crates 1.0b (https://forums.alliedmods.net/showthread.php?t=66777)

oRNY 02-08-2008 14:37

[WS] Weapon Storage Crates 1.0b
 
4 Attachment(s)
Hey, I'm new here.. Hopefully this somewhat creative plug-in will be appreciated :D

Version 1.0b Added functionallity:

"ws_ban name" - Ban someone from using the storage crate.
"ws_unban name" - Unban soneone so he can once again use the storage crate.

"ws_random 0/1" - Defines whether or not the user gets a random weapon when he withdraws, or if he gets to choose from a list. (defaults to 0)
"ws_limituse 0 to 999" Limits the number of weapons a user can withdraw per round. 0 means infinite uses. (defaults to 0)


about:

Ever threw away an awp because you wanted to by an m4a1?
Ever found an AK47 as a CT, and wanted to give it to someone else, or just didn't wanna keep it?

Now you can share all your unwanted - or extra - weapons, with your teammates!

Using a storage crate in each team's spawn area, you can store and withdraw weapons, instead of having them
dissapear as the round changes.

Simply press "E" near the storage crate and you'll be greeted with a few simple options - deposit your current weapon, or withdraw a weapon from the storage crate.

Admins can limit each team's storage capacity by using the "ws_maxitems #" cvar. (default is 10)
Admins can also choose whether or not the storage crates are team specific, or can be used by both sides by using the "ws_teamlimited 0/1" cvar. (default is 1 - team limited.)

On custom maps, the storage crates' coordinates may not be available ahead, so the admin must use the "ws_admin" once command to set the coordinates for each teams' storage crate. (can also be used to change the default coordinates on default maps)
The coordinates will then be saved forever for that custom map.

Weapons are saved on map changes, and on round ends.
If you do not wish for the weapons to be saved on round ends and map changes, which is not recommended, you can use the "ws_save 0/1" cvar. (default is obviously 1).

To display this help screen ingame as an admin, type "ws_help" in the console.

And obviously, there's the "ws_on 0/1" cvar. (defaulted to 1..)

The first time you run this mod, please use the admin panel (ws_admin) and choose option 4: "Reset to defaults", to reset the storage crates' coordinates for all basic maps.
This only needs to be done once.


Pictures:


http://xs224.xs.to/xs224/08065/cs_as...863.jpg.xs.jpghttp://xs224.xs.to/xs224/08065/cs_as...862.jpg.xs.jpg
http://xs224.xs.to/xs224/08065/cs_as...527.jpg.xs.jpghttp://xs224.xs.to/xs224/08065/cs_as...838.jpg.xs.jpg
Credits:

- Me; oRNY (code) and Whenn (models)

Any further requests or advice on how to improve this mod will be greatly appreciated, seeing as this is my first mod.

The source code is full of comments in-case anyone is interested in reading it.

Rencky 02-08-2008 14:55

Re: [WS] Weapon Storage Crates
 
i like it :)
can you make is that when you choose to withdraw a weapon from the box, it randomly gives you one weapon inside the box and you can't withdraw a second time? so you can pick something once per round?

they started throwing all the weapons out, to see what's inside of the box :p

but i need to say: GJ ;)

Howdy! 02-08-2008 15:20

Re: [WS] Weapon Storage Crates
 
Change: Modification: ALL

And if you can upload screenys somewhere else since imageshack is slow and has pop-up ads.

Attachment. ;)

+

Gj, i like the idea.

Reaper2331 02-08-2008 15:32

Re: [WS] Weapon Storage Crates
 
Quote:

Originally Posted by Rencky (Post 582983)
i like it :)
can you make is that when you choose to withdraw a weapon from the box, it randomly gives you one weapon inside the box and you can't withdraw a second time? so you can pick something once per round?

they started throwing all the weapons out, to see what's inside of the box :p

but i need to say: GJ ;)


maybe make a Cvar for this, because people might not want that.

oRNY 02-08-2008 15:37

Re: [WS] Weapon Storage Crates
 
Quote:

Originally Posted by Rencky (Post 582983)
i like it :)
can you make is that when you choose to withdraw a weapon from the box, it randomly gives you one weapon inside the box and you can't withdraw a second time? so you can pick something once per round?

they started throwing all the weapons out, to see what's inside of the box :p

but i need to say: GJ ;)

Good idea, I'll add a cvar for it in the next version. Glad you liked it :)

Quote:

Originally Posted by Howdy! (Post 582991)
Change: Modification: ALL

And if you can upload screenys somewhere else since imageshack is slow and has pop-up ads.

Attachment. ;)

+

Gj, i like the idea.


Thanks, I updated the screenshots, put them on a better faster direct host. Just click the thumbnails.

Rencky 02-08-2008 17:04

Re: [WS] Weapon Storage Crates
 
Quote:

Originally Posted by oRNY (Post 582999)
Good idea, I'll add a cvar for it in the next version. Glad you liked it :)

if it's a CVAR it's even better ;) I can't think of why anyone wouldn't want that, i was trying to fill the box, doing my best, and some guy just threw it all out :( haha

chris 02-08-2008 17:14

Re: [WS] Weapon Storage Crates
 
Nice plugin!

oRNY 02-08-2008 17:17

Re: [WS] Weapon Storage Crates
 
Quote:

Originally Posted by Rencky (Post 583035)
if it's a CVAR it's even better ;) I can't think of why anyone wouldn't want that, i was trying to fill the box, doing my best, and some guy just threw it all out :( haha

What server are you playing on Rencky? I'd love to see the plug-in in action :shock:

@chris: thanks, glad you liked it.

Voi 02-08-2008 19:58

Re: [WS] Weapon Storage Crates
 
good idea but the model is rather ammo box than weaponbox :F

Xanimos 02-08-2008 23:22

Re: [WS] Weapon Storage Crates
 
I personally like the idea of this plugin. However I do have a few suggestions that be done before this could be approved.

1) Don't use hard coded paths for files. Use get_basedir and format in one of your init functions to accomplish the dynamic file locations.
2) Use pcvars over cvars especially in Prethink!
3) Use switch for typeof.
Code:
switch( wp ) {     case: CSW_SCOUT,CSW_MX1014,CSW_...:     {         return W_PRIMARY     }     case: CSW_..., CSW_...:     {          //...     }     default:     {          return W_NONE     }
4) For float_origin use
Code:
float_origin[i] = Float:origin[i]
instead of coverting to string and then to float.


All times are GMT -4. The time now is 18:59.

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