Raised This Month: $ Target: $400
 0% 

How to fix the bug that makes any weapon to influence the damage done by the jetpack?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 10-29-2021 , 10:46   Re: How to fix the bug that makes any weapon to influence the damage done by the jetp
Reply With Quote #4

Quote:
Originally Posted by DJEarthQuake View Post
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 ...

Last edited by GlobalPlague; 10-29-2021 at 10:52. Reason: mistake
GlobalPlague is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode