Page 1 of 1
Cerere 2 pluginuri
Posted: 22 Apr 2011, 09:02
by TzUcK
1 . Doresc acest join_ip
2. Doresc pluignul in care daca faci frag ti se reincarca arma automat .
3. Dau multumesc celor care ma ajuta .
Re: 2 Pluignuri
Posted: 22 Apr 2011, 09:06
by KronoS eXtream
Salut!
2.
- | 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)
}
}
}
1.
Code: Select all
#include <amxmodx>
public plugin_init()
{
register_plugin("Join IP","1.0","KronoS")
}
public client_authorized(id)
{
set_task(0.5,"print_to_chat",id)
}
public print_to_chat(id)
{
new authid[35],username[32],ip[32]
get_user_name(id,username,31)
get_user_ip(id,ip,31,1)
get_user_authid(id,authid,34)
client_print(0,print_chat,"%s (%s) (%s) is connecting to server.",username,ip,authid)
return PLUGIN_CONTINUE
}
Re: Cerere 2 pluginuri
Posted: 22 Apr 2011, 09:36
by TzUcK
Sunt bune ambele . Multumesc .