Raised This Month: $51 Target: $400
 12% 

mvm upgrade restriction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
found amxx bug
Junior Member
Join Date: Dec 2009
Old 07-25-2019 , 03:38   mvm upgrade restriction
Reply With Quote #1

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?

Last edited by found amxx bug; 07-25-2019 at 03:52.
found amxx bug is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 07-28-2019 , 13:28   Re: mvm upgrade restriction
Reply With Quote #2

lock attribute?
__________________
sv_downloadurl Recommended FREE website
000webhost(File is too big (max. 32MB)! Upload will be skipped.)
rejetto
(Local_computer_host)
Getting material/model paths easy way (Windows)
steam profile
Youtube
zyox123cc is offline
found amxx bug
Junior Member
Join Date: Dec 2009
Old 07-29-2019 , 11:18   Re: mvm upgrade restriction
Reply With Quote #3

Quote:
Originally Posted by zyox123cc View Post
lock attribute?
basically , yes.
When you buy upgrade , it blocks and doesn't pay cash
then has a message Sorry, this upgrade it forbidden
found amxx bug is offline
Reply



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 06:40.


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