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

[29/11/09] ScoutzKnivez Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay       
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-07-2009 , 07:40   [29/11/09] ScoutzKnivez Mod
Reply With Quote #1

ScoutzKnivez Mod
Credits :

Merciless : Request (Here)
Hunter-Digital : No Zoom Code
ConnerMcLeod : Improving / No Zoom Code
Kureno : Tester and my <3
xPaw : Optimizing


Information :

7different types to play scoutzknivez :
- Normal Mode
- Knife Mode (Knife Only)
- Scout Mode (Scout Only)
- No Zoom Mode (Scout Only + No Zoom)
- No Slash Mode (Knife Only + No Slash)
- One Hit Mode
- Hs Only Mode


Cvars :

Code:
"skm_enable" default :"1" 
Information: Enables/disables the plugin

"skm_showmessage" default :"1"
Information: Enables/disables messages at round start

"skm_randomtype" default :"1" 
Information :0= Keep the same type 1=Evry new round the type changes 
2= Evry new round there is a random type

"skm_scoutgrav" default :"250"
Information :Scout Gravity

"skm_knifegrav" default :"200"
Information :Knife Gravity

"skm_forcestab" Default :"0"
Information :Force stab at no slash mode

"skm_knifehs" Default :"0"
Information :If hs mode only is activated, 1=Knife hs only , 0=You can kill with knife without hs.

"skm_normalmode" default :"1"
"skm_knifemode" default :"1"
"skm_scoutmode" default :"1"
"skm_nozoommode" default :"1"
"skm_noslashmode" default :"1"
"skm_onehitmode" default :"1"
"skm_hsonlymode" default :"1"
Information : Enables/Disabled modes
Commands :

say /skmod (ADMIN_KICK) : Opens the main menu.

Changelog :

Code:
Version 1.0 : Initial Release
Version 1.1 : Improving/Optimazing
Version 1.2 : Improving + added No Slash Mode
Version 1.3 : Added cvars + Rewrote Menu + Removed fakemeta_util
Version 1.4 : Added cvars + Added One Hit Mode + Fixed No Ammo Bug
Version 1.5 : Fixed bug (got stuck when you disabled the last mode)
Version 1.6 : Added headshot only mode.
Notes :
This plugin was made for the map scoutzknivez(It wont give scouts at round start. Maybe ill add this later)
New ideas/features are welcome.

ToDo List :
Add more types (Im thinking!!)



Attached Files
File Type: sma Get Plugin or Get Source (skmod.sma - 453 views - 13.6 KB)
__________________
I am out of order!

Last edited by grimvh2; 12-20-2009 at 07:36. Reason: Released V1.5
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-07-2009 , 08:23   Re: [07/11/09] Sk Mod
Reply With Quote #2

  • Include <fun> and use give_item instead of fakemeta_util
  • You can generate menu in plugin_init, store it in global variable, and then show to clients (but dont forge to remove menu_destroy lines)
  • PHP Code:
        if(get_pcvar_num(cvar_random) == 1)
        {
            if(
    Type == 6)
                
    nType=0;
            else
                
    nType+=2;
        }
        else if(
    get_pcvar_num(cvar_random) == 2)
        {
            new 
    num random_num(1,4)
            switch(
    num)
            {
                case 
    1:nType=0;
                case 
    2:nType=2;
                case 
    3:nType=4;
                case 
    4:nType=6;
            }
        } 
    • Use switch for cvar.
    • You can directly do switch( random_num( 1, 4 ) )
__________________
xPaw is offline
Jeroen2355
Member
Join Date: Sep 2009
Old 11-07-2009 , 08:30   Re: [07/11/09] Sk Mod
Reply With Quote #3

Nice Plugin
Jeroen2355 is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-07-2009 , 08:36   Re: [07/11/09] Sk Mod
Reply With Quote #4

Quote:
Originally Posted by xPaw View Post
  • You can generate menu in plugin_init, store it in global variable, and then show to clients (but dont forge to remove menu_destroy lines)
Does this have any advantage?
Thx for feedback
__________________
I am out of order!
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-07-2009 , 08:37   Re: [07/11/09] Sk Mod
Reply With Quote #5

Sure it is, you wont always generate the menu, so it will also save natives calling and blabla...
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-07-2009 , 08:50   Re: [07/11/09] Sk Mod
Reply With Quote #6

You forgot the alive check in CurWeapon register line, + filter arg 1 == 1
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-07-2009 , 08:57   Re: [07/11/09] Sk Mod
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
filter arg 1 == 1
?? where ?
__________________
I am out of order!
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-07-2009 , 09:04   Re: [07/11/09] Sk Mod
Reply With Quote #8

Probably here
register_event("CurWeapon", "Weap_Switch", "b", "1=1" );
__________________
xPaw is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-07-2009 , 09:06   Re: [07/11/09] Sk Mod
Reply With Quote #9

Quote:
Originally Posted by xPaw View Post
Probably here
register_event("CurWeapon", "Weap_Switch", "b", "1=1" );
ah, I dind knew that :p
__________________
I am out of order!
grimvh2 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-07-2009 , 09:15   Re: [07/11/09] Sk Mod
Reply With Quote #10

+ flag "e" aka player is alive, so you don't have to check it later in the code :

register_event("CurWeapon", "Weap_Switch", "be", "1=1" );
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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:50.


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