It is currently 14 Aug 2018 19:07



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 2 posts ] 
 Modificare plugin refill on kill 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 16 Mar 2015 00:13
Posts: 112
Location: Suceava
Detinator Steam: Da
CS Status: Work
Detinator server CS: CSGO.CSARENA.NET
SteamID: da
Fond eXtream: 0
[!]As dori refill ammo on kill pe flag

| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Refill Weapon On Kill"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.2"

#define m_iId 43
#define m_iPrimaryAmmoType 49
#define m_fInReload 54

#define m_flNextAttack 83
#define m_pActiveItem 373
#define m_rgAmmo_Player_Slot0 376

#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )

const NOCLIP_WPN_BS = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

new g_iMaxPlayers

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam(Ham_Killed, "player", "Player_Killed", 1)

g_iMaxPlayers = get_maxplayers()
}

public Player_Killed(iVictim, iKiller, iGib)
{
if( IsPlayer(iKiller) && is_user_alive(iKiller) )
{
new iWeapon = get_pdata_cbase(iKiller, m_pActiveItem)
if( iWeapon > 0
&& !( NOCLIP_WPN_BS & (1<<get_pdata_int(iWeapon, m_iId, 4)) ) )
{
new Float:flNextAttack = get_pdata_float(iKiller, m_flNextAttack, 5)
set_pdata_float(iKiller, m_flNextAttack, -0.001, 5)

new iButton = pev(iKiller, pev_button)
set_pev(iKiller, pev_button, iButton & ~(IN_ATTACK|IN_ATTACK2|IN_RELOAD))
set_pdata_int(iWeapon, m_fInReload, 1, 4)
ExecuteHamB(Ham_Item_PostFrame, iWeapon)

set_pdata_int(iKiller, m_rgAmmo_Player_Slot0 + get_pdata_int(iWeapon, m_iPrimaryAmmoType, 4), 200)
set_pdata_float(iKiller, m_flNextAttack, flNextAttack, 5)
set_pev(iKiller, pev_button, iButton)
}
}
}

_________________
ImageImage


08 Aug 2018 05:28
Profile multumesc YIM WWW
Jan Darmu'
Jan Darmu'
User avatar

Joined: 25 Aug 2014 21:31
Posts: 5856
Location: Ploiesti
Detinator Steam: Da
CS Status: All i ever wanted was a Rolly Rolly
SteamID: Jandarmeria
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Fost Moderator ajutator
Fost Super Moderator
eXtream Mod
Fost Intermediar
Nume anterior : Christmas,
A k c 3 n 7
Fond eXtream: 0
| Afiseaza codul
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Refill Weapon On Kill"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.2"

#define m_iId 43
#define m_iPrimaryAmmoType 49
#define m_fInReload 54

#define m_flNextAttack 83
#define m_pActiveItem 373
#define m_rgAmmo_Player_Slot0 376

#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )

const NOCLIP_WPN_BS = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

new g_iMaxPlayers

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam(Ham_Killed, "player", "Player_Killed", 1)

g_iMaxPlayers = get_maxplayers()
}

public Player_Killed(iVictim, iKiller, iGib)
{
if( IsPlayer(iKiller) && is_user_alive(iKiller) && get_user_flags( iKiller ) & ADMIN_LEVEL_H )
{
new iWeapon = get_pdata_cbase(iKiller, m_pActiveItem)
if( iWeapon > 0
&& !( NOCLIP_WPN_BS & (1<<get_pdata_int(iWeapon, m_iId, 4)) ) )
{
new Float:flNextAttack = get_pdata_float(iKiller, m_flNextAttack, 5)
set_pdata_float(iKiller, m_flNextAttack, -0.001, 5)

new iButton = pev(iKiller, pev_button)
set_pev(iKiller, pev_button, iButton & ~(IN_ATTACK|IN_ATTACK2|IN_RELOAD))
set_pdata_int(iWeapon, m_fInReload, 1, 4)
ExecuteHamB(Ham_Item_PostFrame, iWeapon)

set_pdata_int(iKiller, m_rgAmmo_Player_Slot0 + get_pdata_int(iWeapon, m_iPrimaryAmmoType, 4), 200)
set_pdata_float(iKiller, m_flNextAttack, flNextAttack, 5)
set_pev(iKiller, pev_button, iButton)
}
}
}

_________________
ImageImage

Lista intermediari
Nu ezita sa ma contactezi la 112 pentru interventii speciale: S.I.A.S
REGULI GENERALE
REGULILE SECTIUNII ANUNTURI


08 Aug 2018 16:07
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Mobbed and 76 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group