Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement