Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- new g_maxplayers;
- public plugin_init()
- {
- register_plugin("Show Team [Friends] Money","1.0","Seroff");
- register_event("HLTV", "NewRound", "a", "1=0", "2=0");
- g_maxplayers = get_maxplayers();
- }
- public NewRound(){
- new id;
- for (id=1;id<33;id++){
- set_task(2.5,"check_money",id);
- }
- }
- public check_money(id){
- static name[32];
- new money, client;
- for (client = 1; client <= g_maxplayers; client++)
- {
- if (client != id && is_user_connected(id) && is_user_connected(client) && cs_get_user_team(client) == cs_get_user_team(id))
- {
- money = cs_get_user_money(client);
- get_user_name(client, name, 31);
- ColorChat(id,"^3%s - ^1[^4%d^1]", name, money);
- }
- }
- }
- stock ColorChat(const id, const input[], any:...)
- {
- new count = 1, players[32]
- static msg[191]
- vformat(msg, 190, input, 3)
- replace_all(msg, 190, "!g", "^4") // Зелёный
- replace_all(msg, 190, "!n", "^1") // Стандартный
- replace_all(msg, 190, "!t", "^3") // Цвет команды
- 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, get_user_msgid("SayText"), _, players[i])
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment