Quote:
Originally Posted by DJEarthQuake
Attempts to fix the exploit. Untested.
Code:
#include engine_stocks
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )
{
if(!has_fired_rocket(attacker))
SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
}
bool:has_fired_rocket(attacker)
{
new fired_rocket = find_ent(-1,"info_jetpack_rocket")
return pev(fired_rocket, pev_owner) != attacker ? false : true
}
|
Hello. Thanks for trying to help me.
Sadly, i get the following errors hwnei try to compile to code you gave me:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team
//// bugfix.sma
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(4) : error 017: undefined symbol "is_valid_player"
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(4) : warning 215: expression has no effect
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(4) : error 001: expected token: ";", but found "]"
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(6) : error 010: invalid function or declaration
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(7) : error 021: symbol already defined: "get_pcvar_float"
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(18 ) : warning 203: symbol is never used: "SetHamParamFloat"
// C:\Mod\cstrike\addons\amxmodx\scripting\bugfi x.sma(18 ) : warning 203: symbol is never used: "has_fired_rocket"
//
// 4 Errors.
// Could not locate output file C:\Mod\cstrike\addons\amxmodx\scripting\compi led\bugfix.amx (compile failed).
//
// Compilation Time: 0.53 sec
// ----------------------------------------
Press enter to exit ...