View Single Post
Author Message
JuanitoAlimana
Senior Member
Join Date: Aug 2021
Old 11-15-2022 , 02: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 03:19.
JuanitoAlimana is offline