Raised This Month: $ Target: $400
 0% 

Edit a Plugin [Very Simple]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
N4K9D
Junior Member
Join Date: Dec 2012
Old 03-23-2013 , 11:43   Edit a Plugin [Very Simple]
Reply With Quote #1

Hello, can somebody add in this plugin 1 deagle with full ammo, he grenade and smoke grenade, please


HTML Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>

new g_FwdKeyValue;
new cvar_knife_allow;

public plugin_init() {
    register_plugin("AWP & KNIFE", "0.4", "Ex3cuTioN/Arion");
    
    new map[32];
    get_mapname(map,31);
    
    if(equali(map, "awp_", 3)) {
        RegisterHam(Ham_Spawn, "player", "ham_player_spawn", 1);
        unregister_forward(FM_KeyValue, g_FwdKeyValue);
    
        cvar_knife_allow = register_cvar("amx_give_knife","1");
    }
}

public plugin_precache() {
    new map[32];
    get_mapname(map,31);
    
    if(equali(map, "awp_", 3))
        g_FwdKeyValue = register_forward(FM_KeyValue, "Forward_KeyValue" );
}

public Forward_KeyValue(const EntIndex, const KvdHandle) {
    if(pev_valid(EntIndex)) { 
        new szClassName[16];
        get_kvd(KvdHandle, KV_ClassName, szClassName, charsmax(szClassName));
            
        if(equal(szClassName, "armoury_entity")) { 
            engfunc(EngFunc_RemoveEntity, EntIndex);
            
            return FMRES_SUPERCEDE;
        }
    }
        
    return FMRES_IGNORED;
}

public ham_player_spawn(const id,ent) {
    strip_user_weapons(id);
    set_task(0.5,"cmd_awp",id);

    return PLUGIN_CONTINUE;
}

public cmd_awp(id) {
    give_item(id,"weapon_awp");
    cs_set_user_bpammo(id, CSW_AWP, 30);

    if(get_pcvar_num(cvar_knife_allow) == 1) 
        give_item(id,"weapon_knife");
        
    return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
N4K9D 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 01:12.


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