this is about tf2 mvm upgrades
just a simple plugin which blocks players to buy some upgrades(like explode_on_ignite , some canteens even generate rage on heal(shield) )
this is what my thought
1. I saw event was sent :player_upgraded. but it seems doing nothing with it. instead, it shows this:
Code:
57.25: REMEMBER_UPGRADE: Player 'found amxx bug', item '#TF_Unique_MediGun_Resist', upgrade 'generate rage on heal', cost '300'
Unhandled GameEvent in ClientModeShared::FireGameEvent - player_upgraded
58.31: FORGET_UPGRADE: Player 'found amxx bug', item '#TF_Unique_MediGun_Resist', upgrade 'generate rage on heal', cost '-300'
this gives me a idea I may write :
Code:
public OnPluginStart()
{
HookEvent("player_upgraded", playerupgraded);
}
public playerupgraded(Handle:event, const String:name[], bool:dontBroadcast)
{
if (REMEMBER_UPGRADE == generate rage on heal) {
FORGET_UPGRADE(generate rage on heal)
PrintToChat(client,"Sorry this upgrade is forbidden")
}
}
However, this wouldn't work because FORGET_UPGRADE and REMEMBER_UPGRADE are undefined
next thought. Can I rewrite increment to 0 by using plugin so that everybody can't buy it?
example:
Code:
"57"
{
"attribute" "explode_on_ignite"
"icon" "achievements/tf_demoman_achieve_progress3"
"increment" "1" //
"cap" "1" //
"cost" "400"
}
my goal is several mvm upgrade restriction( not all)
any ideas/hints?