Raised This Month: $32 Target: $400
 8% 

Donate Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 03-07-2021 , 09:32   Donate Money
Reply With Quote #1

Hello. I made this plugin but it does not work. What is the problem? The plugin does not work when I want to give money players.

Last edited by Theodore Bagwell; 03-08-2021 at 15:07.
Theodore Bagwell is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 03-07-2021 , 18:52   Re: Donate Money
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=9720
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 03-08-2021 , 07:54   Re: Donate Money
Reply With Quote #3

Please fix my code.
Theodore Bagwell is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-08-2021 , 07:59   Re: Donate Money
Reply With Quote #4

Quote:
Originally Posted by Theodore Bagwell View Post
Please fix my code.
Why? What's so special about it when you have another plugin that is actually working?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 03-08-2021 , 08:27   Re: Donate Money
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Why? What's so special about it when you have another plugin that is actually working?
I know that plugin works. I want to know why my code does not work
Theodore Bagwell is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-08-2021 , 11:26   Re: Donate Money
Reply With Quote #6

I'd recommend using read_argv() instead of read_args() in this case.
Use str_to_num instead of checking is_str_num and store it in a variable. Check if it's valid.

Also, i'd just keep it simple and just use 1 function instead of creating a new one, CmdHandler1 is really unnessecary.

here's some code i'd use in this case:

PHP Code:
new szMoney[6];
read_argv(1szMoneycharsmax(szMoney));

new 
iMoney str_to_num(szMoney);

if(
iMoney)
{
    
// Valid value passed.

And to be honest, just read and write more to learn, logical thinking will get you far.
__________________

Last edited by Napoleon_be; 03-08-2021 at 11:28.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Parshan
New Member
Join Date: May 2023
Old 05-22-2023 , 06:16   Re: Donate Money
Reply With Quote #7

Quote:
Originally Posted by Theodore Bagwell View Post
Hello. I made this plugin but it does not work. What is the problem? The plugin does not work when I want to give money players.FM WhatsApp
Did you edited the post and removed your code? Isn't it helpful for others too? It gives others some idea as well.
Parshan is offline
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 05-22-2023 , 14:09   Re: Donate Money
Reply With Quote #8

Quote:
Originally Posted by Parshan View Post
Did you edited the post and removed your code? Isn't it helpful for others too? It gives others some idea as well.
yeah, those are "private plugins" that they dont want to share with others but anytime there's a problem, they are running to alliedmodders to ask for help. lmao
__________________
a simple act of caring creates an endless ripple.
Nutu_ 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 00:06.


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