Raised This Month: $ Target: $400
 0% 

help with grenades + kevlar + deagle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-17-2013 , 13:54   Re: help with grenades + kevlar + deagle
Reply With Quote #4

Try this :

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#tryinclude <cstrike_pdatas>

#if !defined _cbaseentity_included
        #assert Cstrike Pdatas and Offsets library required! Read the below instructions:   \
                
1. Download it at forums.alliedmods.net/showpost.php?p=1712101#post1712101   \
                
2. Put it into amxmodx/scripting/include/ folder   \
                
3. Compile this plugin locallydetailswiki.amxmodx.org/index.php/Compiling_Plugins_%28AMX_Mod_X%29   \
                
4. Install compiled plugindetailswiki.amxmodx.org/index.php/Configuring_AMX_Mod_X#Installing
#endif

enum scoreAttribFlags ( <<= ) {
    
SA_NONE 0,
    
SA_DEAD 1,
    
SA_BOMB,
    
SA_VIP
}

const 
WEAPON_SUIT 31

public plugin_init()
{
    
register_plugin("Admins are VIP's + grenades + kevlar""2.0""Eg@r4$il{")
    
RegisterHam(Ham_Spawn"player""OnCBasePlayer_Spawn")
    
RegisterHam(Ham_Spawn"player""OnCBasePlayer_Spawn_Post"true)
}

public 
OnCBasePlayer_Spawnid )
{
    if( 
pev_valid(id) == && (CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT) && is_user_admin(id) )
    {
        
set_pdata_bool(idm_bHasReceivedDefItemstrue)
    }
}

public 
OnCBasePlayer_Spawn_Postid )
{
    if( 
is_user_alive(id) && is_user_admin(id) )
    {
        
Util_ScoreAttrib(0idSA_VIP)

        
give_item(id"weapon_knife")
        
give_item(id"item_assaultsuit")
        
give_item(id"weapon_deagle")
        
ExecuteHam(Ham_GiveAmmoid70"50AE"70)
        
give_item(id"item_suit")
    }
}

Util_ScoreAttrib(idtargetflags)
{
    static 
msgScoreAttrib 0;
    if( !
msgScoreAttrib )
    {
        
msgScoreAttrib get_user_msgid("ScoreAttrib");
    }

    
message_begin(id MSG_ONE MSG_ALLmsgScoreAttrib_id);
    
write_byte(target);
    
write_byte(flags);
    
message_end();

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-21-2013 at 15:32.
ConnorMcLeod is offline
 



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 10:46.


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