Quote:
Originally Posted by SaraAki
Thank you.
What about this:
PHP Code:
register_event("DeathMsg", "Event_DeathMsg", "a")
PHP Code:
public Event_DeathMsg()
{
new iKiller = read_data(DeathMsg_KillerID)
if( IsPlayer(iKiller) && is_user_connected(iKiller) )
{
new iVictim = read_data(DeathMsg_VictimID)
if( iVictim != iKiller )
{
g_iNewMoney = clamp
(
cs_get_user_money(iKiller) + get_pcvar_num( cs_get_user_team(iVictim) == cs_get_user_team(iKiller) ? g_pCvarTkMoney : (read_data(DeathMsg_IsHeadshot) ? g_pCvarKillMoneyHs : g_pCvarKillMoney) ),
0,
get_pcvar_num(g_pCvarMaxMoney)
)
g_iMsgHookMoney = register_message(gmsgMoney, "Message_Money")
}
}
}
What I want is,if the player dies from the laser no bonus money for the killer.
what did i try is:
PHP Code:
if(IsLM(iKiller))
return PLUGIN_HANDLED
static szWeaponName[ 6 ];
read_data( 4, szWeaponName, charsmax( szWeaponName ) );
if ( equal( szWeaponName, "world" ) )
return PLUGIN_HANDLED
but this doesn't work
|
"iKiller" contains the player ID.
The "IsLM" function checks whether the entity ID corresponds to a Lasermine.
Retrieve read_data(4) and check whether the weapon is a lasermine.
PHP Code:
if (equali(szWeaponName, "lasermine"))
return PLUGIN_HANDLED;
If you want to control the amount of money, set "amxx_ltm_frag_money" to zero and use the "cs_set_user_money" function based on conditions.
__________________