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], playerCount, i, player, pMoney;
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(player, pMoney);
ColorChat(player,NORMAL,"%L",LANG_PLAYER,"MONEY_AMOUNT",pMoney)
}
}
}
Thanks!