Raised This Month: $ Target: $400
 0% 

Free grenades for admins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 10-03-2010 , 13:18   Free grenades for admins
Reply With Quote #1

Hello everybody,
Can someone make me a plugin that at round start admins with ADMIN_LEVEL_H automatically receive 1xHE,2xFB,1xSmoke grenades.
dreamedward is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-03-2010 , 13:26   Re: Free grenades for admins
Reply With Quote #2

Code:
#include <amxmodx>
#include <hamsandwich>


public plugin_init() 
{
    register_plugin( "Give Nades on Spawn", "1.0", "nikhilgupta345" );
    
    RegisterHam( Ham_Spawn, "player", "fwdPlayerSpawn", 1 );
}

public fwdPlayerSpawn( id )
{
    if( is_user_alive( id ) && get_User_flags( id ) & ADMIN_LEVEL_H ) 
    {
        give_item( id, "weapon_hegrenade" )
        give_item( id, "weapon_flashbang" )
        give_item( id, "weapon_flashbang' )
        give_item( id, "weapon_smokegrenade" )
    }
    
}
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 10-03-2010 , 13:46   Re: Free grenades for admins
Reply With Quote #3

Thank you!
dreamedward is offline
Old 10-03-2010, 14:13
Erdener
This message has been deleted by Erdener. Reason: Wait.
amigosaostiroos
Senior Member
Join Date: Sep 2010
Location: Portugal
Old 10-13-2010 , 15:52   Re: Free grenades for admins
Reply With Quote #4

thanks
amigosaostiroos is offline
Nunox
New Member
Join Date: May 2011
Old 07-27-2012 , 07:53   Re: Free grenades for admins
Reply With Quote #5

ERROR : if( is_user_alive( id ) && get_User_flags( id ) & ADMIN_LEVEL_H )
To Compiler . Help!!!
Nunox is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-27-2012 , 07:55   Re: Free grenades for admins
Reply With Quote #6

Quote:
Originally Posted by Nunox View Post
ERROR : if( is_user_alive( id ) && get_User_flags( id ) & ADMIN_LEVEL_H )
To Compiler . Help!!!
get_user_flags( id )
__________________
<VeCo> is offline
Nunox
New Member
Join Date: May 2011
Old 04-08-2013 , 03:41   Re: Free grenades for admins
Reply With Quote #7

No Does work -.-

Last edited by Nunox; 04-08-2013 at 03:43.
Nunox is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-08-2013 , 04:13   Re: Free grenades for admins
Reply With Quote #8

Can also use this :

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

#define FLAG_ADMIN_FULL_NADES ADMIN_LEVEL_H

#define PLUGIN "Admin Full Grenades on Spawn"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" )
    
RegisterHam(Ham_Spawn"player""OnCBasePlayer_Spawn_Post"true)
}

public 
OnCBasePlayer_Spawn_Postid )
{
    if( 
is_user_alive(id) && get_user_flags(id) & FLAG_ADMIN_FULL_NADES )
    {
        new 
weapons pev(idpev_weapons)
        if( ~
weapons CSW_HEGRENADE )
        {
            
give_item(id"weapon_hegrenade")
        }
        if( ~
weapons CSW_SMOKEGRENADE )
        {
            
give_item(id"weapon_smokegrenade")
        }
        if( ~
weapons CSW_FLASHBANG )
        {
            
give_item(id"weapon_flashbang")
        }
        
ExecuteHamB(Ham_GiveAmmoid1"Flashbang"2)
    }

__________________
- 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 09:11.


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