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

Message Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 01-18-2017 , 03:49   Message Help
Reply With Quote #1

Code:
case 1:
	{
		new arg[32]
		new text[70] 
		read_args(text, sizeof(text) - 1);
		remove_quotes(text);
		parse(text, arg, sizeof(arg) - 1);
		
		if(isdigit(arg[0])) 
		{
			new amount = str_to_num(arg)
			if (amount <= 0)
			{
				zp_colored_print(id, "^x04[ZP BANK] ^x01Successfully Deposited %d Ammo Packs In Bank",amount);
				
				return PLUGIN_CONTINUE;
			}
			store_packs(id, amount);
			
			return PLUGIN_HANDLED;
I made a menu for this plugin it's working fine except the manual amount to be deposited, How to do that using messagemod ? Thanks
Awesome_man is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-18-2017 , 05:07   Re: Message Help
Reply With Quote #2

Code:
            if (amount <= 0)             {                 zp_colored_print(id, "^x04[ZP BANK] ^x01Successfully Deposited %d Ammo Packs In Bank",amount);                                 return PLUGIN_CONTINUE;             }             store_packs(id, amount);

- >
Code:
            if (amount)             {                 zp_colored_print(id, "^x04[ZP BANK] ^x01Successfully Deposited %d Ammo Packs In Bank",amount);                 store_packs( id , amount );                 return PLUGIN_CONTINUE;             }
__________________
Project: Among Us

Last edited by Craxor; 01-18-2017 at 05:11.
Craxor is offline
Send a message via ICQ to Craxor
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-18-2017 , 05:42   Re: Message Help
Reply With Quote #3

PHP Code:
            if (amount >= 0)
            {
                
zp_colored_print(id"^x04[ZP BANK] ^x01Successfully Deposited %d Ammo Packs In Bank",amount);
                
store_packsid amount );
            } 
__________________

Last edited by edon1337; 01-18-2017 at 05:44.
edon1337 is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 01-18-2017 , 05:55   Re: Message Help
Reply With Quote #4

Quote:
Originally Posted by edon1337 View Post
PHP Code:
            if (amount >= 0)
            {
                
zp_colored_print(id"^x04[ZP BANK] ^x01Successfully Deposited %d Ammo Packs In Bank",amount);
                
store_packsid amount );
            } 
Ya my bad i forgot this but how to pass value while selection the menu ? That's my original post. Thanks
Awesome_man is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-18-2017 , 06:57   Re: Message Help
Reply With Quote #5

What value ? Where to pass it?
__________________
edon1337 is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 01-18-2017 , 09:44   Re: Message Help
Reply With Quote #6

Quote:
Originally Posted by edon1337 View Post
What value ? Where to pass it?
Actually i want whenever i press the menu button for my case 1 it should take value as a input to be entered by user(amount) how to do that ?
Awesome_man is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-18-2017 , 10:17   Re: Message Help
Reply With Quote #7

still doesn't make any sense, when he choose case 1 what to happen ?
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-18-2017 , 11:32   Re: Message Help
Reply With Quote #8

Quote:
Originally Posted by Awesome_man View Post
it should take value as a input to be entered by user(amount)
Huh ? Please try explaining in a more detailed way. Do you want a withdraw option ?
__________________
edon1337 is offline
MaXs
Member
Join Date: Jan 2017
Old 01-18-2017 , 12:16   Re: Message Help
Reply With Quote #9

He probably mean when you click 1 its says in chat that you need to set value how much to put
MaXs is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-18-2017 , 13:28   Re: Message Help
Reply With Quote #10

Quote:
Originally Posted by MaXs View Post
He probably mean when you click 1 its says in chat that you need to set value how much to put
That's basically what I just said, withdraw option.

You can do that by using read_args
__________________
edon1337 is offline
Reply


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 13:03.


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