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

Solved [L4D2] Give Random Weapon Commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kalt
New Member
Join Date: Sep 2018
Old 05-12-2022 , 02:21   [L4D2] Give Random Weapon Commands
Reply With Quote #1

Hello! I've looked all over the place for a plugin that does just this with no luck (unless I'm just blind), I apologize in advanced if one already exists.

The idea is straight forward, adding a command that allows for giving a weapon or item to players from a select category of items at random.

These commands could be split up in a variety of groups for specified random selection, such as the following:

sm_randomitem <#userid|name> "[Category]" ---- Base command.
sm_randomitem <#userid|name> "random" ---- Give the selected player(s) a random item (Anything that you can spawn using "Give")
sm_randomitem <#userid|name> "smg" ---- Give the selected player(s) a random weapon from the smg category (silenced_smg, etc.)
sm_randomitem <#userid|name> "healing" ---- Give the selected player(s) a random item from the healing items category (first_aid_kit, pain_pills, etc.)

You get the idea, I hope I was able to adequately explain how I believe the plugin would work, I'd really appreciate any help towards this!

(Additional, smaller request, is a command that drops a live throwable, such as a pipebomb, on specified player(s), similar to that of the "boom" command.)

Last edited by Kalt; 05-12-2022 at 13:45.
Kalt is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-12-2022 , 05:16   Re: [L4D2] Give Random Weapon Commands
Reply With Quote #2

You can create your own categories or use default one

Commands
PHP Code:
!randomitem_dump dumps config to console
!randomitem_reload reloads config
!randomitem gives item (Usagesm_randomitem <#userid|name> <item:category>) 
Put config to sourcemod/data/ folder and edit it to your desire.
If something doesn't work then please report
Attached Files
File Type: cfg l4d2_give_random.cfg (1.2 KB, 26 views)
File Type: sp Get Plugin or Get Source (l4d2_give_random.sp - 45 views - 7.6 KB)
__________________
cry

Last edited by BHaType; 05-12-2022 at 05:17.
BHaType is offline
Send a message via AIM to BHaType
Kalt
New Member
Join Date: Sep 2018
Old 05-12-2022 , 13:44   Re: [L4D2] Give Random Weapon Commands
Reply With Quote #3

Quote:
Originally Posted by BHaType View Post
You can create your own categories or use default one

Commands
PHP Code:
!randomitem_dump dumps config to console
!randomitem_reload reloads config
!randomitem gives item (Usagesm_randomitem <#userid|name> <item:category>) 
Put config to sourcemod/data/ folder and edit it to your desire.
If something doesn't work then please report
Works perfectly, thank you very much!
Kalt 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 16:28.


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