Raised This Month: $ Target: $400
 0% 

round_money request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JuanitoAlimana
Member
Join Date: Aug 2021
Old 11-15-2022 , 03:56   round_money request
Reply With Quote #1

This plugin sets everyone's money to a certain amount at the start of the round. Is there a way to make it so it gives 30000 to players with the ADMIN_IMMUNITY flag and 5000 to everyone else?

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

new MONEY;

public 
plugin_init()
{
    
register_plugin("round_money","0.7","SweatyBanana")
    
    
MONEY register_cvar("round_money","30000")
    
    
/* 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);
            
ColorChat(player,NORMAL,"%L",LANG_PLAYER,"MONEY_AMOUNT",pMoney)
        }
    } 

Thanks!

Last edited by JuanitoAlimana; 11-15-2022 at 04:19.
JuanitoAlimana is offline
lexzor
Senior Member
Join Date: Nov 2020
Old 11-16-2022 , 12:27   Re: round_money request
Reply With Quote #2

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

#define ACCESS ADMIN_IMMUNITY

enum _:TYPE {
    
ADMIN 0,
    
PLAYER 1
}

new 
MONEY[TYPE];

public 
plugin_init()
{
    
register_plugin("round_money","0.7","SweatyBanana")
    
    new 
data register_cvar("round_money_admin","30000")
    
MONEY[ADMIN] = get_pcvar_num(data);
    
    
data register_cvar("round_money_player","5000")
    
MONEY[PLAYER] = get_pcvar_num(data);

    
/* Register LANG file */
    
register_dictionary("rmlang.txt")
    
    
register_logevent("new_round"2"1=Round_Start")
}
public 
new_round()
{
    new 
players[32], playerCount;
    
    
get_players(players,playerCount);
    
    for(new 
iiMoneyplayer;i<playerCount;i++)
    {
        
player players[i];
        
iMoney = (get_user_flags(player) & ACCESS) ? MONEY[ADMIN] : MONEY[PLAYER]

        if(
cs_get_user_money(player) < iMoney)
        {
            
cs_set_user_money(playeriMoney);
            
client_print_color(playerprint_team_default"%l""MONEY_AMOUNT"iMoney);
        }
    } 

lexzor is offline
JuanitoAlimana
Member
Join Date: Aug 2021
Old 11-16-2022 , 18:23   Re: round_money request
Reply With Quote #3

I get the following error:

String formatted incorrectly - parameter 6 (total 5)
[AMXX] Displaying debug trace (plugin "round_money.amxx", version "0.7")
[AMXX] Run time error 25: parameter error
[AMXX] [0] round_money.sma::new_round (line 43)
JuanitoAlimana is offline
lexzor
Senior Member
Join Date: Nov 2020
Old 11-17-2022 , 11:04   Re: round_money request
Reply With Quote #4

post .txt file
lexzor is offline
JuanitoAlimana
Member
Join Date: Aug 2021
Old 11-17-2022 , 16:28   Re: round_money request
Reply With Quote #5

Quote:
Originally Posted by lexzor View Post
post .txt file
.txt file says exactly the same

L 11/16/2022 - 19:22:51: String formatted incorrectly - parameter 6 (total 5)
L 11/16/2022 - 19:22:51: [AMXX] Displaying debug trace (plugin "round_money.amxx", version "0.7")
L 11/16/2022 - 19:22:51: [AMXX] Run time error 25: parameter error
L 11/16/2022 - 19:22:51: [AMXX] [0] round_money.sma::new_round (line 43)
JuanitoAlimana is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-18-2022 , 08:28   Re: round_money request
Reply With Quote #6

Add this to plugin_init()

PHP Code:
AddTranslation("en"CreateLangKey("MONEY_AMOUNT"), "You've been given $%d!"); 
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-18-2022 at 08:29.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
MichealLeedy
New Member
Join Date: Jan 2023
Old 01-20-2023 , 02:30   Re: round_money request
Reply With Quote #7

Hello, I was looking for the plugin online that sets everyone's money to a certain amount at the start of the round and I am glad I found your post. This is the exact plugin, I was looking for. When I was searching for it online, I also found a loan app for android phone and I took interest in that app because I need urgent cash to pay my appartment rent.

Last edited by MichealLeedy; 01-24-2023 at 08:16.
MichealLeedy 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 08:14.


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