Raised This Month: $305 Target: $400
 76%   Almost there!

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
__________________
+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?
__________________


Dear admins. If somehow you managed to read this, plz fix.
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.
__________________
My Plugins:


Accepting private projects.

Last edited by Napoleon_be; 03-08-2021 at 11:28.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 01:28.


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