1. About the damage event, try it
PHP Code:
public Event_Damage(id)
{
static iAttacker; iAttacker = get_user_attacker(id)
static iDamage; iDamage = read_data(2)
set_dhudmessage(random_num(50,255), random_num(50,255), random_num(50,255), random_float(0.20, 0.60), random_float(0.20, 0.60), 0, 6.0, 0.5)
show_dhudmessage(iAttacker, "Damage given: %d", damage)
}
About the Ham_TakeDamage, I've tested here without your arrays and it works, I think what OciXCrom is correct. And you can do your code like this, looks more fine
PHP Code:
public fw_HamTakeDamage(victim, inflictor, attacker, Float:damage, damagebit)
{
if(!is_user_alive(victim) || !is_user_alive(attacker))
return HAM_IGNORED
if(!victim || !attacker)
return HAM_IGNORED
switch(damagebit)
{
case DMG_FALL:
{
SetHamReturnInteger(0)
return HAM_SUPERCEDE
}
case DMG_GRENADE:
{
if(attacker == victim)
{
SetHamReturnInteger(0)
return HAM_SUPERCEDE
}
}
default: // Idk if it is correct
{
new iWeapon = get_user_weapon(attacker)
switch(iWeapon)
{
case CSW_DEAGLE:
{
if(deagle_used[attacker])
{
SetHamParamFloat(4, damage * 999.0)
client_print(attacker, print_chat, "It Works !!")
}
}
case CSW_AK47:
{
if(ak47_used[attacker])
{
SetHamParamFloat(4, damage * 999.0)
client_print(attacker, print_chat, "It Works !!")
}
}
}
}
}
return HAM_IGNORED
}
2. I think not
3. About the Semiclip, this is the version i'm using
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
new const VERSION[] = "0.7.0"
const MAX_PLAYERS = 32
new g_iPlayers[MAX_PLAYERS], g_iNum, g_iPlayer, i
new const g_szAliveFlags[] = "a"
#define RefreshPlayersList() get_players(g_iPlayers, g_iNum, g_szAliveFlags)
public plugin_init()
{
register_plugin("Semiclip", VERSION, "ConnorMcLeod")
register_forward(FM_AddToFullPack, "FM_client_AddToFullPack_Post", 1)
RegisterHam(Ham_Player_PreThink, "player", "Ham_CBasePlayer_PreThink_Post", 1)
}
public FM_client_AddToFullPack_Post(es, e, iEnt, id, hostflags, player, pSet)
{
if( player && id != iEnt && get_orig_retval() && is_user_alive(id) )
{
set_es(es, ES_Solid, SOLID_NOT)
}
}
public Ham_CBasePlayer_PreThink_Post(id)
{
if( !is_user_alive(id) )
{
return
}
RefreshPlayersList()
for(i = 0; i<g_iNum; i++)
{
g_iPlayer = g_iPlayers[i]
if( id != g_iPlayer && get_user_team(id) == get_user_team(g_iPlayer))
{
set_pev(g_iPlayer, pev_solid, SOLID_NOT)
}
}
}
public client_PostThink(id)
{
if( !is_user_alive(id) )
{
return
}
RefreshPlayersList()
for(i = 0; i<g_iNum; i++)
{
g_iPlayer = g_iPlayers[i]
if( g_iPlayer != id && get_user_team(id) == get_user_team(g_iPlayer))
{
set_pev(g_iPlayer, pev_solid, SOLID_SLIDEBOX)
}
}
}
4.
https://forums.alliedmods.net/showpo...93&postcount=5 - I think is that what you're searching
5.
https://wiki.alliedmods.net/Finding_...es_(amx_mod_x)
6. This?
https://forums.alliedmods.net/showpo...80&postcount=5
May be this?
https://forums.alliedmods.net/showpo...2&postcount=14
Or this
https://forums.alliedmods.net/showthread.php?t=123684
If all those links doesn't work for you -
https://forums.alliedmods.net/showpo...7&postcount=10
Ah, another one -
https://forums.alliedmods.net/showpo...60&postcount=8
Ops, another -
https://forums.alliedmods.net/showpo...2&postcount=52
LOL, I found another -
https://forums.alliedmods.net/showth...=123684&page=6
Ok, I'll stop it
__________________