Kod:
#include <amxmodx>
#include <reapi>
new const PLUGIN[] = "Give_Money_By_Round";
new const VERSION[] = "1.0";
new const AUTHOR[] = "By.KinG";
new Round;
new Cvar[3];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("HLTV", "Event_Round_Start", "a", "1=0", "2=0");
Cvar[0] = register_cvar("WebAilesi_Round", "2");
Cvar[1] = register_cvar("WebAilesi_Money", "1000");
Cvar[2] = register_cvar("WebAilesi_Flags", "A");
}
public Event_Round_Start()
{
Round++;
if(Round % get_pcvar_num(Cvar[0]) == 0)
{
new Players[32], Num_Alive_All, New_ID, Flags[33], Flags_ID, Amount;
get_players(Players, Num_Alive_All, "achi");
get_pcvar_string(Cvar[2], Flags, 32);
Flags_ID = read_flags(Flags);
Amount = get_pcvar_num(Cvar[1]);
for(new i; i < Num_Alive_All; i++)
{
New_ID = Players[i];
if(get_user_flags(New_ID) & Flags_ID == Flags_ID)
{
rg_add_account(New_ID, Amount, AS_ADD);
}
}
}
}
stock Renkli_Yazi(const ID, const Input[], any:...)
{
static Message[191];
vformat(Message, 190, Input, 3);
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^3", "^x03");
replace_all(Message, 190, "^4", "^x04");
new Count = 1, Players[32];
if(ID) Players[0] = ID; else get_players(Players, Count, "ch");
{
for(new i = 0; i < Count; i++)
{
if(is_user_connected(Players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, Players[i]);
write_byte(Players[i]);
write_string(Message);
message_end();
}
}
}
})

