PHP Code:
L 07/11/2010 - 00:01:13: [CSTRIKE] Player out of range (0)
L 07/11/2010 - 00:01:13: [AMXX] Displaying debug trace (plugin "vip_money.amxx")
L 07/11/2010 - 00:01:13: [AMXX] Run time error 10: native error (native "cs_get_user_money")
L 07/11/2010 - 00:01:13: [AMXX] [0] kvip_money.sma::EventDeathMsg (line 21)
PHP Code:
#include < amxmodx >
#include < cstrike >
const VipFlags = ADMIN_LEVEL_H;
new iMoney;
new iMoney_Hs;
new iMoney_Kill;
public plugin_init( ) {
register_plugin( "PLUGIN", "VERSION", "AUTHOR" );
register_event( "DeathMsg", "EventDeathMsg", "a" );
iMoney_Hs = register_cvar( "amx_money_hs", "800" );
iMoney_Kill = register_cvar( "amx_money_kill", "500" );
}
public EventDeathMsg( ) {
if( get_user_flags( read_data( 1 ) ) & VipFlags ) {
if( cs_get_user_money( read_data( 1 ) ) >= 16000 ) {
return PLUGIN_HANDLED;
}
if( read_data( 3 ) )
iMoney = get_pcvar_num( iMoney_Hs );
else
iMoney = get_pcvar_num( iMoney_Kill );
cs_set_user_money( read_data( 1 ), cs_get_user_money( read_data( 1 ) ) -300 + iMoney );
}
return PLUGIN_HANDLED;
}