TS Random Weapons
1 Attachment(s)
True random weapons AMXX plugin for Half-Life mod, "The Specialists" - Updated to version 1.4
I requested a plugin like this on both amx and amxx, but since no-one was keen to code it, I eventually did it myself. Unlike the standard TS random weapons function, this one is forced, and is truly random. Just spawn and you will receive your guns. Features: -Forces player to take a random number of guns (to a maximum of your choosing). -Each gun they receive is also a random selection. -50/50 chance of players receiving a random set of attachments for each gun (ie silencer, lasersight etc). -Relative chance of no guns at all (ie Kung-fu only). Usage: -requires TSX, TFUN & ENGINE modules cvars: amx_randomweapons <Max Weapons|0> Give players random weapons, maximum no. given in the setting (1 by default) amx_randomattachments <1|0> Give players random attachments (off by default) amx_randomrestrictions <Restriction|0> Restricts the weapon pool to certain groups amx_randomkungfu <1|0> Give players relative chance of kung fu (off by default) Possible amx_weaponrestriction settings: 0: All Weapons 1: Kung-Fu only 2: Melee only 3: Pistols & Melee 4: Pistols & Shotguns & Melee 5: Pistols only (no melee) 6: Shotguns only (no melee) 7: Rifles only (no melee) 8: Sub-machineguns only (no melee) 9: Pistols & Shotguns only (no melee) 10: Shotguns & Rifles only (no melee) 11: Rifles and Sub-machineguns only (no melee) 12: All Weapons (Excluding Melee & Grenade) 13: All Weapons (Excluding Melee) 14: All Weapons (Excluding Grenade) I recommend you set weaponrestriction to 1, but it will work fine without it. If you turn randomweapons off, you'll have to reset weaponrestriction to the value you want, since the plugin will change it to 1 when it's running. Credits: Thanks to AssKicR for his powerup-spawning code, XxAvalanchexX and Knare for their help on the AMXX forums, and darkpast for his suggestion about the kungfu powerup Thanks to eskimobob, darkpast, Sphericus and o_OR4N^_^ for their assistance in playtesting Changelog: version 1.4(31/3/06) -cleaned up code (no more magic numbers, changed if/else set to switch) -generalised give_powerup function -added akimbo mini uzi (was missing from last version) version 1.3 (18/11/05) -additional weapon restrictions -updated for AMXX 1.60 -readded Kung-Fu powerup (Thanks to AssKicR for use of his powerup-spawning code) version 1.2 (15/7/05) -removed single knife sets -added cvar to turn off getting kung-fu as a weapon -added cvar to turn off randomized attachments -changed amx_randomweapons to specify the maximum number of guns given to a player version 1.1 (26/5/05) -removed kung-fu powerup for kung-fu only -added weapon restrictions (group restrictions like TS default) -changed akimbo guns and different knife holdouts to be seperate weapons version 1.0 (2/2/05) -release |
Pretty nice job.
|
lol taht pretty cool i have tried it works alright :lol:
GOOD JOB!!! |
Updated to version 1.2
Changelog: version 1.2 (15/7/05) -removed single knife sets -added cvar to turn off getting kung-fu as a weapon -added cvar to turn off randomized attachments -changed amx_randomweapons to specify the maximum number of guns given to a player version 1.1 (26/5/05) -removed kung-fu powerup for kung-fu only -added weapon restrictions (group restrictions like TS default) -changed akimbo guns and different knife holdouts to be seperate weapons |
You need to require_module() all of the modules you use.
Code:
And, don't post a zip, just post the .sma file. |
Updated for AMXX 1.60, and several additional features added.
version 1.3 (18/11/05) -updated for AMXX 1.60 -additional weapon restrictions -readded Kung-Fu powerup (Thanks to AssKicR for use of his powerup-spawning code) Thanks to AssKicR, the powerup spawning feature has been readded, and it actually works now. The plugin also no longer requires TSX, just TSFUN, and ENGINE for spawning kung-fu powerups. |
could you provide a readme.txt file along the ways of how to edit the file before compling it so that i can get it to work properly please...
thanks, Alex |
It should work properly as it is, there shouldn't be a need to modify it. If there is a problem with how it runs, or it won't compile properly, I'll try to fix it if you can describe the problem.
|
its been a while since you made this plugin, but i just downloaded it recently and noticed a couple things. No one has ever spawned with akimbo mini-uzis, sometimes people will spawn with the same gun several times in a row (3-4), and there have been a rare few anomilies where everyone in the server has spawned with the same gun. thoes last two could be coincidence i suppose, but you definetely can't get akimbo mini-uzis.
|
Thanks for the feedback Wayside. I hadn't planned on releasing an update until after TS3 was realeased, given that I would have to modify it for this anyway. Of course, I decided this when it seemed like TS3 would be released in the near future.
As for the anomolies, I put this down to the random number function in the Small library. Unfortunately this is normal behavior for the plugin. (My clanmates complain about it all the time.) I'll release an updated version ASAP, thanks. |
All times are GMT -4. The time now is 07:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.