Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fun>
- #include <cstrike>
- new const flags_immune[][] = {
- "abcdefghijklmnopqrstu",
- "abcdefghijkmnopqrstu",
- "abcdefghijkmnopqrst",
- "abcdefghijkmnopqrs",
- "abcdefghijkmnopqr"
- }
- new const messages[][] = {
- "Se desfasoara eventul 'Beneficii Free'!^nSistem Event Beneficii by PedoBear for Dexter.",
- "Eventul 'Beneficii Free' ruleaza intre orele 21 - 09!"
- }
- new bool:beneficii = false
- public plugin_init()
- {
- register_event("DeathMsg", "EDeathMsg", "a");
- register_event("HLTV", "RundaNoua", "a", "1=0", "2=0");
- }
- public RundaNoua()
- check_time();
- public check_time()
- {
- new o;
- time(o, _, _);
- if(21 <= o || o < 09)
- {
- beneficii = true;
- set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 5.0, 4.0);
- show_hudmessage(0, messages[0]);
- ColorChat (0, "!yEste !gOra !t21:00 !yServerul !tactiveaza !gbeneficiile free !y!");
- ColorChat (0, "!yEvent !gBeneficii by !gPedoBear !yfor !gDexter. !y!");
- }
- else
- {
- beneficii = false;
- set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 5.0, 4.0);
- show_hudmessage(0, messages[1]);
- ColorChat (0, "!yEste !gOra !t09:00 !yServerul !tdezactiveaza !gbeneficiile free !y!");
- ColorChat (0, "!yEvent !gBeneficii by !gPedoBear !yfor !gDexter. !y!");
- }
- }
- public EDeathMsg()
- {
- if(!beneficii)
- return;
- new k = read_data(1), v = read_data(2);
- if(k == v || !is_user_alive(k))
- return;
- for(new i = 0; i < sizeof flags_immune; i++)
- if(get_user_flags(k) == read_flags(flags_immune[i]))
- return;
- set_user_health(k, get_user_health(k) + 30);
- set_user_armor(k, get_user_armor(k) + 30);
- cs_set_user_money(k, cs_get_user_money(k) + 3000);
- }
- 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, "!y", "^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_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment