AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Donate Money (https://forums.alliedmods.net/showthread.php?t=331126)

Theodore Bagwell 03-07-2021 09:32

Donate Money
 
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.

+ARUKARI- 03-07-2021 18:52

Re: Donate Money
 
https://forums.alliedmods.net/showthread.php?t=9720

Theodore Bagwell 03-08-2021 07:54

Re: Donate Money
 
Please fix my code.

OciXCrom 03-08-2021 07:59

Re: Donate Money
 
Quote:

Originally Posted by Theodore Bagwell (Post 2739698)
Please fix my code.

Why? What's so special about it when you have another plugin that is actually working?

Theodore Bagwell 03-08-2021 08:27

Re: Donate Money
 
Quote:

Originally Posted by OciXCrom (Post 2739700)
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

Napoleon_be 03-08-2021 11:26

Re: Donate Money
 
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.

Parshan 05-22-2023 06:16

Re: Donate Money
 
Quote:

Originally Posted by Theodore Bagwell (Post 2739588)
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.

Nutu_ 05-22-2023 14:09

Re: Donate Money
 
Quote:

Originally Posted by Parshan (Post 2804814)
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


All times are GMT -4. The time now is 05:08.

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