Raised This Month: $ Target: $400
 0% 

Custom money amount?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 08-01-2018 , 16:23   Re: Custom money amount?
Reply With Quote #2

You need to hook message money itself and check their parameters, better than use a death message..

Edit

Code:
#include <amxmodx>

public plugin_init()
{
	register_plugin("Test","0.2","SmileY");

	register_message(get_user_msgid("Money"),"MsgMoney");
}

public MsgMoney(Msg,Dest,id)
{
	switch(get_msg_arg_int(1)) // I'm not have sure how we can hook money changes, this is a test
	{
		case 300:
		{
			set_msg_arg_int(1,ARG_LONG,600); // Set 600 instead of 300
			return PLUGIN_HANDLED;
		}
	}

	return PLUGIN_CONTINUE;
}
Not tested yet
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 08-01-2018 at 16:36.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 


Thread Tools
Display Modes

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 20:27.


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