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

Award Grenades: Reloaded v1.5


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   v3x (159)
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 08-14-2008 , 16:13   Award Grenades: Reloaded v1.5
Reply With Quote #1

Award Grenades: Reloaded

.: Description :.
When you kill a person you'll be awarded with Grenades.
You can use 3 conditions:
1. Team
2. Head Shot
3. Weapon

.: Required Modules :.
Fun
CSX
CStrike

.: CVARs :.
Code:
award_nades 1        //Enables the plugin
award_he 1        //How many HE Grenades a player should be awarded when killing another player?
award_fb 1        //How many Flash Bangs a player should be awarded when killing another player?
award_sg 1        //How many Smoke Grenades a player should be awarded when killing another player?
he_max 3        //What's the maximum number of HEs a player can be awarded with?
fb_max 5        //What's the maximum number of FBs a player can be awarded with?
sg_max 4        //What's the maximum number of SGs a player can be awarded with?
award_team Any        //Which team should be awarded? (Any, CT, T)
award_headshot 0    //Is a Head Shot needed ot get awarded?
award_weapon any    //What weapon is needed to get awarded? (knife, usp, glock18, etc.)
.: CMDs :.
Code:
say /awardcmds                                //Shows Award Grenades: Reloaded Commands
say /awardmenu                                //Shows a menu to know the awards and conditions
award_nades_toggle <0|1>                        //ADMIN_LEVEL_D, Enables or disables the plugin
award_nades_awards <he><fb><sg>                        //ADMIN_LEVEL_D, Changes the the awarded Grenades
give_nade <name> <nade>    <amount>                    //ADMIN_LEVEL_D, Gives a Grenade to a player
//Leave <nade> empty to give all Grenades, 'he' to give HEs, 'fb' to give Flash Bangs, 'sg' to give smoke grenades
award_team_toggle <Any|CT|T>                        //ADMIN_LEVEL_D, Changes which team should be awarded? *case sensetive*
award_hs_toggle <0|1>                            //ADMIN_LEVEL_D, Changes if a head shot is needed to get awarded
award_wpn_toggle <any|weapon name>                    //ADMIN_LEVEL_D, Changes if a weapon is needed to get awarded (knife, usp, glock18, etc.)
award_valid_weapons                            //ADMIN_LEVEL_D, Shows valid weapons
award_valid_weapons2                            //ADMIN_LEVEL_D, Shows the rest of the valid weapons
.: Updates :.
v1.1
- Fixed some scripting errors

v1.2
- Added award_team cvar and award_team_toggle command

v1.3
-Changed name to "Award Grenades: Reloaded"
-Added award_headshot and award_weapon CVARs
-Added award_nades_awards, award_hs_toggle, award_wpn_toggle, award_valid_weapons and award_valid_weapons2 ADMIN_LEVEL_D commands
-Added /awardcmds and /awardmenu client commands

v1.4
-Some bug fixes

v1.5
-Removed "award_fb_amount" CVAR
-Added "he_max", "fb_max" and "sg_max" CVARs
-Now the plugin uses v3x's Grenade Sack method to give nades

Requested
Attached Files
File Type: sma Get Plugin or Get Source (award_nades.sma - 4638 views - 20.0 KB)
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System

Last edited by Sam Tsuki; 09-07-2008 at 12:02.
Sam Tsuki is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2008 , 16:22   Re: Award Grenades
Reply With Quote #2

You can remove #include <engine> as engine is not needed.
client_death is a csx forward so you need to include it.

You must use pcvars and learn how to use it.
PHP Code:
    //Check if Award Grenades is enabled
    
if(award_nades == 0) return PLUGIN_HANDLED 
Correct way :
PHP Code:
    //Check if Award Grenades is enabled
    
if(get_pcvarnum(award_nades) == 0) return PLUGIN_HANDLED 
There's a lot of other errors.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-14-2008 at 16:27.
ConnorMcLeod is offline
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 08-14-2008 , 16:24   Re: Award Grenades
Reply With Quote #3

Quote:
Originally Posted by connorr View Post
You can remove #include <engine> as engine is not needed.
client_death is a csx forward so you need to include it.

You must use pcvars and learn how to use it.
PHP Code:
    //Check if Award Grenades is enabled
    
if(award_nades == 0) return PLUGIN_HANDLED 
Correct way :
PHP Code:
    //Check if Award Grenades is enabled
    
if(get_pcvarnum(award_nades) == 0) return PLUGIN_HANDLED 
There's a lot of other errors.
Done with everything
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System

Last edited by Sam Tsuki; 08-14-2008 at 16:31.
Sam Tsuki is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2008 , 16:37   Re: Award Grenades
Reply With Quote #4

Then this is false :

PHP Code:
    award_nades str_to_num(arg
And you still don't use pcvars for :
PHP Code:
    register_cvar("award_he""1")
    
register_cvar("award_fb""1")
    
register_cvar("award_fb_amount""2")
    
register_cvar("award_sg""1"
Also you should use DeathMsg event instead of csx forward.

Other big error :
PHP Code:
    if(get_cvar_num("award_fb") == 1) {
        
give_item(attacker"weapon_flashbang")
        if(
get_cvar_num("award_fb_amount") == 2)
            
give_item(attacker"weapon_flashbang")
    } 
Value 2 will never be detected.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 08-14-2008 , 16:44   Re: Award Grenades
Reply With Quote #5

Quote:
Originally Posted by connorr View Post
Then this is false :

PHP Code:
    award_nades str_to_num(arg
And you still don't use pcvars for :
PHP Code:
    register_cvar("award_he""1")
    
register_cvar("award_fb""1")
    
register_cvar("award_fb_amount""2")
    
register_cvar("award_sg""1"
Also you should use DeathMsg event instead of csx forward.

Other big error :
PHP Code:
    if(get_cvar_num("award_fb") == 1) {
        
give_item(attacker"weapon_flashbang")
        if(
get_cvar_num("award_fb_amount") == 2)
            
give_item(attacker"weapon_flashbang")
    } 
Value 2 will never be detected.
That's wierd
I test it and it's working well
When I used DeathMsg I got a no free edict error
I tried putting award_fb_amount to 1 and 2 and both worked probably
And about the:
Code:
award_nades = str_to_num(arg)
Even if I used:
Code:
award_nades = arg
It will still do the same
Correct me if anything is wrong
I'm still new you know
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System

Last edited by Sam Tsuki; 08-14-2008 at 16:46.
Sam Tsuki is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2008 , 17:10   Re: Award Grenades
Reply With Quote #6

Quote:
Originally Posted by Sam Tsuki View Post
Even if I used:
Code:
award_nades = arg
Seems that you should learn more before posting plugins.
Just keep on.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 08-14-2008 , 19:54   Re: Award Grenades
Reply With Quote #7

Quote:
Originally Posted by connorr View Post
client_death is a csx forward so you need to include it.
No, you don't.
__________________
No support via PM.

Last edited by Lee; 08-14-2008 at 19:56.
Lee is offline
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 08-14-2008 , 20:01   Re: Award Grenades
Reply With Quote #8

Quote:
Originally Posted by Lee View Post
No, you don't.
I thought so cuz it was working before I included the csx.inc :O
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System
Sam Tsuki is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-14-2008 , 22:20   Re: Award Grenades
Reply With Quote #9

Quote:
Originally Posted by Lee View Post
No, you don't.
Of course you have to !
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 08-14-2008 , 22:23   Re: Award Grenades
Reply With Quote #10

Quote:
Originally Posted by connorr View Post
Of course you have to !
The man says it works without it.... any reason he should include it?
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores 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 13:45.


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