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

Solved Round Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JuanitoAlimana
Senior Member
Join Date: Aug 2021
Old 06-03-2023 , 23:37   Round Money
Reply With Quote #1

I'm using this round money plugin, but, I want the plugin to give 16.000 from the second round on. I'm currently doing it with the task scheduler (amx_task 2 round_money 16000 m) but sometimes we reach the second round before the two minutes mark so the plugin doesn't "kick in" in time. What do I need to add to make this possible? Thanks!

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new MONEY;

public 
plugin_init()
{
    
register_plugin("round_money","0.7","SweatyBanana")
    
    
MONEY register_cvar("round_money","16000")
    
    
/* Register LANG file */
    
register_dictionary("rmlang.txt")
    
    
register_logevent("new_round"2"1=Round_Start")
}
public 
new_round()
{
    new 
players[32], playerCountiplayerpMoney;
    
pMoney get_pcvar_num(MONEY)
    
    
get_players(players,playerCount);
    
    for(
i=0;i<playerCount;i++)
    {
        
player players[i];
        if(
cs_get_user_money(player) < pMoney)
        {
            
cs_set_user_money(playerpMoney);
            
client_print_color(playerprint_team_default,"^3%L",LANG_PLAYER,"MONEY_AMOUNT",pMoney)
        }
    } 


Last edited by JuanitoAlimana; 06-05-2023 at 18:39.
JuanitoAlimana is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 06-04-2023 , 07:53   Re: Round Money
Reply With Quote #2

[QUOTE=JuanitoAlimana;2805477]I'm using this round money plugin, but, I want the plugin to give 16.000 from the second round on. I'm currently doing it with the task scheduler (amx_task 2 round_money 16000 m) but sometimes we reach the second round before the two minutes mark so the plugin doesn't "kick in" in time. What do I need to add to make this possible? Thanks!



Try this, it works for me.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new MONEY;

public 
plugin_init()
{
    
register_plugin("round_money","0.7","SweatyBanana");
    
    
MONEY register_cvar("round_money","16000");
    
    
/* Register LANG file */
    
register_dictionary("rmlang.txt");
    
    
register_logevent("new_round"2"1=Round_Start");
}

public 
new_round()
{
    new 
players[32], playerCountiplayerpMoney;
    
pMoney get_pcvar_num(MONEY);
    
    
get_players(playersplayerCount);
    
    for(
0playerCounti++)
    {
        
player players[i];
        if(
cs_get_user_money(player) < pMoney)
        {
            
cs_set_user_money(playerpMoney);
            
client_print(playerprint_chat"You have received: %d"pMoney);
        }
    } 


Last edited by Uzviseni Bog; 06-04-2023 at 10:27.
Uzviseni Bog is offline
JuanitoAlimana
Senior Member
Join Date: Aug 2021
Old 06-04-2023 , 16:48   Re: Round Money
Reply With Quote #3

[QUOTE=Uzviseni Bog;2805490]
Quote:
Originally Posted by JuanitoAlimana View Post
I'm using this round money plugin, but, I want the plugin to give 16.000 from the second round on. I'm currently doing it with the task scheduler (amx_task 2 round_money 16000 m) but sometimes we reach the second round before the two minutes mark so the plugin doesn't "kick in" in time. What do I need to add to make this possible? Thanks!



Try this, it works for me.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new MONEY;

public 
plugin_init()
{
    
register_plugin("round_money","0.7","SweatyBanana");
    
    
MONEY register_cvar("round_money","16000");
    
    
/* Register LANG file */
    
register_dictionary("rmlang.txt");
    
    
register_logevent("new_round"2"1=Round_Start");
}

public 
new_round()
{
    new 
players[32], playerCountiplayerpMoney;
    
pMoney get_pcvar_num(MONEY);
    
    
get_players(playersplayerCount);
    
    for(
0playerCounti++)
    {
        
player players[i];
        if(
cs_get_user_money(player) < pMoney)
        {
            
cs_set_user_money(playerpMoney);
            
client_print(playerprint_chat"You have received: %d"pMoney);
        }
    } 

It is exactly the same plugin lol
JuanitoAlimana is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 06-05-2023 , 06:41   Re: Round Money
Reply With Quote #4

[QUOTE=JuanitoAlimana;2805501]
Quote:
Originally Posted by Uzviseni Bog View Post

It is exactly the same plugin lol



Your attachment has errors, I don't see what the problem is, I just fixed it.LOL


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "client_print_color" on line 31
Warning: Expression has no effect on line 31
Warning: Expression has no effect on line 31
Warning: Expression has no effect on line 31
Warning: Expression has no effect on line 31
Error: Expected token: ";", but found ")" on line 31
Error: Invalid expression, assumed zero on line 31
Error: Too many error messages on one line on line 31

Compilation aborted.
4 Errors.
(compile failed).

Last edited by Uzviseni Bog; 06-05-2023 at 06:42.
Uzviseni Bog is offline
JuanitoAlimana
Senior Member
Join Date: Aug 2021
Old 06-05-2023 , 16:36   Re: Round Money
Reply With Quote #5

[QUOTE=Uzviseni Bog;2805523]
Quote:
Originally Posted by JuanitoAlimana View Post




Your attachment has errors, I don't see what the problem is, I just fixed it.LOL


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "client_print_color" on line 31
Warning: Expression has no effect on line 31
Warning: Expression has no effect on line 31
Warning: Expression has no effect on line 31
Warning: Expression has no effect on line 31
Error: Expected token: ";", but found ")" on line 31
Error: Invalid expression, assumed zero on line 31
Error: Too many error messages on one line on line 31

Compilation aborted.
4 Errors.
(compile failed).
Because you're using AMX Mod X 1.8.1-300...
JuanitoAlimana is offline
JuanitoAlimana
Senior Member
Join Date: Aug 2021
Old 06-05-2023 , 18:39   Re: Round Money
Reply With Quote #6

Nevermind, managed to do it myself. Thanks anyways!
JuanitoAlimana is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 06-06-2023 , 10:59   Re: Round Money
Reply With Quote #7

[QUOTE=JuanitoAlimana;2805555]
Quote:
Originally Posted by Uzviseni Bog View Post

Because you're using AMX Mod X 1.8.1-300...

This is the version from the official website for amx mod x, the latest version titled amx mod x full installer 1.8.2. I don't know why it says it is a 1.8.1-300 compiler.
Uzviseni Bog is offline
Reply



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 02:31.


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