Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <cstrike>
- #include <csx>
- new const PLUGIN[] = "Bomb Bonus Money";
- new const VERSION[] = "1.0";
- #pragma semicolon 1
- new const szTag[] = "!g[AMXX]!n";
- // CVARs
- new cvar_plant_money, cvar_defuse_money, cvar_explode_give_money, cvar_explode_take_money;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, "Adventx");
- // CVARs
- register_cvar("bomb_bonus_money", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
- cvar_plant_money = register_cvar("amx_plant_money", "300");
- cvar_defuse_money = register_cvar("amx_defuse_money", "500");
- cvar_explode_give_money = register_cvar("amx_explode_give_money", "1000");
- cvar_explode_take_money = register_cvar("amx_explode_take_money", "500");
- }
- // CSX
- public bomb_planted(planter)
- {
- cs_set_user_money(planter, cs_get_user_money(planter) + get_pcvar_num(cvar_plant_money));
- ChatColor(planter, "%s You got !t%d$ !nfor planting Bomb!", szTag, get_pcvar_num(cvar_plant_money));
- }
- public bomb_defused(defuser)
- {
- cs_set_user_money(defuser, cs_get_user_money(defuser) + get_pcvar_num(cvar_defuse_money));
- ChatColor(defuser, "%s You got !t%d$ !nfor defusing Bomb!", szTag, get_pcvar_num(cvar_defuse_money));
- }
- public bomb_explode(planter, defuser)
- {
- cs_set_user_money(planter, cs_get_user_money(planter) + get_pcvar_num(cvar_explode_take_money));
- ChatColor(planter, "%s You got !t%d$ !nfor explode Bomb!", szTag, get_pcvar_num(cvar_explode_give_money));
- cs_set_user_money(defuser, cs_get_user_money(defuser) - get_pcvar_num(cvar_explode_give_money));
- ChatColor(defuser, "%s You take !t%d$ !nfor explode Bomb!", szTag, get_pcvar_num(cvar_explode_take_money));
- }
- stock ChatColor(const id, const input[], any:...)
- {
- new count = 1, players[32];
- static msg[191];
- vformat(msg, 190, input, 3);
- replace_all(msg, 190, "!g", "^4"); // Green Color
- replace_all(msg, 190, "!n", "^1"); // Default Color
- replace_all(msg, 190, "!t", "^3"); // Team Color
- replace_all(msg, 190, "!t2", "^0"); // Team2 Color
- 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(msg);
- message_end();
- }
- }
- }
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement