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

[CSGO] Random Weapons (v1.0, 9/04/2017)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Keplyx
Member
Join Date: Apr 2017
Location: France
Plugin ID:
5588
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Gives a random weapon to the player on a kill (more options below)
    Old 04-09-2017 , 13:20   [CSGO] Random Weapons (v1.0, 9/04/2017)
    Reply With Quote #1

    Random Weapons
    Description
    This plugin gives players a random weapon on spawn and on a kill.
    You can choose how the plugin works through cvars (see Features).
    This is made for deathmatch, but can work in other gamemodes too.

    Features
    • Specify the probability of weapons individually through cvars (Set the weapon's proba to 0 if you don't want to have it in game)
    • Disable/enable knife damage with cvar
    • Set the kills needed to get a new weapon (random or fixed integer)
    • Respawn with last weapon or a new one
    • Set whether to display kills needed for new weapon
    • Sets buy time to 0, so players cannot change weapon


    CVars
    Config file is auto-generated, take a look inside it for more info.
    Code:
    • rdm_enable_knife (Sets whether knife does damage. 0 = no damage, 1 = normal damage)
    • rdm_kills_needed_max
    • rdm_kills_needed_min (Sets the max/min kills needed to get a random weapon. Kills needed value is random between min and max. Set rdm_kills_needed_min and rdm_kills_needed_max at the same value if you want a fixed number of kills. min = 1, max = 100)
    • rdm_show_kill_count (Sets whether to show the kills needed to get a new weapon. 0 = no, 1 = yes)
    • rdm_spawn_last_weapon (Sets whether to spawn with the last weapon. If no, the kill counter will be reset on spawn, if yes, it will stay. 0 = no, 1 = yes)
    • rdm_weapon_ak47
    • rdm_weapon_aug
    • rdm_weapon_awp
    • rdm_weapon_bizon
    • rdm_weapon_deagle
    • rdm_weapon_elite
    • rdm_weapon_famas
    • rdm_weapon_fiveseven
    • rdm_weapon_g3sg1
    • rdm_weapon_galilar
    • rdm_weapon_glock
    • rdm_weapon_hkp2000
    • rdm_weapon_m249
    • rdm_weapon_m4a1
    • rdm_weapon_mac10
    • rdm_weapon_mag7
    • rdm_weapon_mp7
    • rdm_weapon_mp9
    • rdm_weapon_negev
    • rdm_weapon_nova
    • rdm_weapon_p250
    • rdm_weapon_p90
    • rdm_weapon_sawedoff
    • rdm_weapon_scar20
    • rdm_weapon_sg556
    • rdm_weapon_ssg08
    • rdm_weapon_tec9
    • rdm_weapon_ump45
    • rdm_weapon_xm1014 (Sets the probability of the weapon. 0 = min proba, 1 = max proba)
    Installation
    Standard, place the .smx in the sourcemod/plugins folder

    Bugs
    If you have any problem with the plugin, post it here, I'll try to help you or fix the problem.





    I'm new to modding and this is my first plugin, so any feedback or tips on improving are welcome!
    Hope you like it!

    Attached Files
    File Type: sp Get Plugin or Get Source (rdm-weapons.sp - 1450 views - 9.8 KB)

    Last edited by Keplyx; 04-09-2017 at 13:23.
    Keplyx is offline
    Dabosman
    Junior Member
    Join Date: Mar 2004
    Old 10-28-2019 , 14:44   Re: [CSGO] Random Weapons (v1.0, 9/04/2017)
    Reply With Quote #2

    Hi Keplyx!

    Thanks for this great plugin. Nice and straight-forward .. and I like the options with probability of weapons and knife enable-disable.

    I'm wanting to do 1 thing .. and I unfortunately don't know coding yet to be able to do this:

    We used to use a plugin that chose ONE random weapon for ALL players on the map. I know this would be even more simple that what you wrote. Can you modify the code to allow for EVERYONE having the SAME weapon at the start of each round? And then everyone also gets a NEW random SAME weapon at the start of next round? This would effectively make everyone play with the same weapon (P90, Deagle, AWP, etc.) for the duration of each round?

    I realize there would be different checks you would have to do to make this configurable and complete .. but if you just made me a custom version for now that did this simple thing (ignoring the Kill Count checks etc .. just set a variable once it picks random weapon and gives that same variable/weapon to all players) ... that would be great!

    Just let me know .. and thanks in advance!
    __________________

    Last edited by Dabosman; 11-07-2019 at 01:00.
    Dabosman 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 15:19.


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