Raised This Month: $32 Target: $400
 8% 

Counter Strike Classes


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
mlb
Junior Member
Join Date: May 2011
Location: US
Old 06-01-2011 , 17:25   Counter Strike Classes
Reply With Quote #1

If Counter-Strike had a class system, I'd imagine this is similar to how it would be done.

Description
Allows specific models in Counter-Strike to spawn with preset weapons. Uses the constants defined by the <cstrike> module ( http://www.amxmodx.org/funcwiki.php?go=module&id=4 ) to designate equipment/weapons for each model. Note that you also need to add ammo to the cvar.

CVARS
csc_enable "1"
csc_arctic_gear "18 17 9" // awp glock smoke
csc_guerilla_gear "14 26 25 4" // galil deag flash HE
csc_leet_gear "28 16 31" // ak usp vest
csc_terror_gear "30 1 9 4 32" // p90 p228 smoke HE vesthelm
csc_gign_gear "18 16 31 9 25" // awp usp vest smoke flash
csc_gsg9_gear "22 16 31" // m4 usp vest
csc_sas_gear "15 26 32" // famas deag vesthelm
csc_urban_gear "19 26 31 25" // mp5 deag vest flash
csc_noknives "0" // enable or disable spawning with a knife.

Weapon Numbers
Code:
  1. weapon_p228
  2. weapon_none // not sure why there is no 2 in the CS weapon constants...
  3. weapon_scout
  4. weapon_hegrenade
  5. weapon_xm1014
  6. item_thighpack
  7. weapon_mac10
  8. weapon_aug
  9. weapon_smokegrenade
  10. weapon_elite
  11. weapon_fiveseven
  12. weapon_ump45
  13. weapon_sg550
  14. weapon_galil
  15. weapon_famas
  16. weapon_usp
  17. weapon_glock18
  18. weapon_awp
  19. weapon_mp5navy
  20. weapon_m249
  21. weapon_m3
  22. weapon_m4a1
  23. weapon_tmp
  24. weapon_g3sg1
  25. weapon_flashbang
  26. weapon_deagle
  27. weapon_sg552
  28. weapon_ak47
  29. weapon_knife
  30. weapon_p90
  31. item_kevlar
  32. item_assaultsuit
  33. ammo_45acp
  34. ammo_9mm
  35. ammo_50ae
  36. ammo_357sig
  37. ammo_57mm
  38. ammo_buckshot
  39. ammo_556nato
  40. ammo_762nato
  41. ammo_338magnum
  42. ammo_308
  43. ammo_556natobox
  44. item_nvgs
  45. weapon_shield
  46. item_longjump
Commands
  • csc_refresh - ADMIN_CVAR rights required. Refreshes any weapons set while on that map. A changelevel also refreshes them.

Other Stuff
  • I suggest mp_buytime "0" while this mod is enabled. It makes more sense that way.
  • If csc_noknives is set to "1", you can still add knives to specific classes.
  • Also see http://forums.alliedmods.net/showthread.php?p=1479533 for changing speed based on models. It is meant for use in conjunction with this plugin.

Change Log
  • 1.1 - Removed VIP until I find a good way to check for it. Added a ton of comments and changed code a bit to make it more readable. Removed the broken HL Items from list. Caches player model now instead of getting it every spawn. Added a native for my other plugins.
  • 1.1.1 - Fixed bug on initial spawn for the map it would not give weapons

Enjoy.
Attached Files
File Type: inc model_classes.inc (61 Bytes, 437 views)
File Type: sma Get Plugin or Get Source (model_classes.sma - 1319 views - 9.5 KB)
__________________

Last edited by mlb; 06-03-2011 at 20:21. Reason: Reformatting post
mlb is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-02-2011 , 14:14   Re: Counter Strike Classes
Reply With Quote #2

All the HL1 ammo/weapon won't work on CS.
__________________
Arkshine is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 06-03-2011 , 07:19   Re: Counter Strike Classes
Reply With Quote #3

PHP Code:
"weapon_quantumdestabilizer"    // 83 
invalid entity in halflife/cs
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
mlb
Junior Member
Join Date: May 2011
Location: US
Old 06-03-2011 , 13:45   Re: Counter Strike Classes
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
All the HL1 ammo/weapon won't work on CS.
Quote:
Originally Posted by tuty View Post
PHP Code:
"weapon_quantumdestabilizer"    // 83 
invalid entity in halflife/cs
Thank you both. I've removed all those HL items except the jump and changed how the plugin keeps track of player models. Hopefully now it can get approved

I hope I did the native function correctly. I'm going to test shortly, but I'm still working on the other plugin I'm using to test.
__________________

Last edited by mlb; 06-03-2011 at 14:17. Reason: Fixed
mlb is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 06-03-2011 , 17:16   Re: Counter Strike Classes
Reply With Quote #5

PHP Code:
"item_longjump",    // 46 
this won't work in cs... try connor longjump plugin, cuz steam disabled longjump on cs since update, and in hl works with keyphysicsvalue
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-03-2011 , 18:45   Re: Counter Strike Classes
Reply With Quote #6

item_longjump entity is still available. All the code is still there, except just in PM_Jump where the code has been removed. Also, in CZ, it works fine.
__________________
Arkshine is offline
mlb
Junior Member
Join Date: May 2011
Location: US
Old 06-03-2011 , 19:33   Re: Counter Strike Classes
Reply With Quote #7

Removed longjump. I don't know if it really belongs in the mod anyways...
Also note that this plugin will not work on maps like the aim_sk series that delay giving weapons to the player.
I'm going to consider that not a bug, but I suggest disabling this plugin on those maps.
__________________

Last edited by mlb; 06-03-2011 at 19:39.
mlb is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-03-2011 , 19:41   Re: Counter Strike Classes
Reply With Quote #8

No, don't remove it... Again, the entity is VALID and WORKS and it's NEEDED. It's just when you're about to jump, for CS1.6 ONLY, the code has been removed there. So, you need just an extra plugin, still the entity is used as usual.
__________________

Last edited by Arkshine; 06-03-2011 at 19:43.
Arkshine is offline
mlb
Junior Member
Join Date: May 2011
Location: US
Old 06-03-2011 , 19:52   Re: Counter Strike Classes
Reply With Quote #9

><! Added it back.
__________________
mlb is offline
drumzplaya13
Senior Member
Join Date: Feb 2008
Location: TEXAS
Old 06-06-2011 , 12:59   Re: Counter Strike Classes
Reply With Quote #10

So basically your able to assign different weapons to the different classes on each team? Interesting.
__________________
Think Positive - Stay Positive
drumzplaya13 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 19:07.


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