Raised This Month: $95 Target: $400
 23% 

[WS] Weapon Storage Crates 1.0b


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Emp` (115)
oRNY
Member
Join Date: Feb 2008
Location: Israel
Old 02-08-2008 , 15:37   [WS] Weapon Storage Crates 1.0b
Reply With Quote #1

Hey, I'm new here.. Hopefully this somewhat creative plug-in will be appreciated

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:




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.
Attached Files
File Type: rar Weapon Storage.rar (3.41 MB, 2449 views)
File Type: sma Get Plugin or Get Source (weaponstorage.sma - 2598 views - 30.9 KB)

Last edited by oRNY; 02-09-2008 at 17:09. Reason: updated to 1.0b
oRNY is offline
Rencky
Member
Join Date: Sep 2007
Old 02-08-2008 , 15:55   Re: [WS] Weapon Storage Crates
Reply With Quote #2

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 ;)
__________________
I live for hardstyles....I live for hardstyle baby
Rencky is offline
Howdy!
Senior Member
Join Date: Feb 2007
Old 02-08-2008 , 16:20   Re: [WS] Weapon Storage Crates
Reply With Quote #3

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.
__________________
[IMG]http://img221.**************/img221/5608/howdyfinnishhq2.jpg[/IMG]

Last edited by Howdy!; 02-08-2008 at 16:24.
Howdy! is offline
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 02-08-2008 , 16:32   Re: [WS] Weapon Storage Crates
Reply With Quote #4

Quote:
Originally Posted by Rencky View Post
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.
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
oRNY
Member
Join Date: Feb 2008
Location: Israel
Old 02-08-2008 , 16:37   Re: [WS] Weapon Storage Crates
Reply With Quote #5

Quote:
Originally Posted by Rencky View Post
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! View Post
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.
oRNY is offline
Rencky
Member
Join Date: Sep 2007
Old 02-08-2008 , 18:04   Re: [WS] Weapon Storage Crates
Reply With Quote #6

Quote:
Originally Posted by oRNY View Post
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
__________________
I live for hardstyles....I live for hardstyle baby
Rencky is offline
chris
Senior Member
Join Date: Mar 2007
Location: America
Old 02-08-2008 , 18:14   Re: [WS] Weapon Storage Crates
Reply With Quote #7

Nice plugin!
__________________
chris is offline
Send a message via AIM to chris
oRNY
Member
Join Date: Feb 2008
Location: Israel
Old 02-08-2008 , 18:17   Re: [WS] Weapon Storage Crates
Reply With Quote #8

Quote:
Originally Posted by Rencky View Post
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

@chris: thanks, glad you liked it.
oRNY is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 02-08-2008 , 20:58   Re: [WS] Weapon Storage Crates
Reply With Quote #9

good idea but the model is rather ammo box than weaponbox :F
__________________
Voi is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-09-2008 , 00:22   Re: [WS] Weapon Storage Crates
Reply With Quote #10

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.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply


Thread Tools
Display Modes

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 02:11.


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