Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #include <engine>
- #include <hamsandwich>
- #define PLUGIN "New Plug-In"
- #define VERSION "1.0"
- #define AUTHOR "nacknic"
- new g_countrounds,
- g_id,
- HamHook:g_hamplayerduck;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- register_event("HLTV", "freezetime", "a", "1=0", "2=0");
- register_logevent("roundstart", 2, "1=Round_Start");
- register_logevent("roundend", 2, "1=Round_End");
- DisableHamForward(g_hamplayerduck = RegisterHam(Ham_Player_Duck, "player", "duckFunc"));
- }
- public client_putinserver(id) g_id = id;
- public freezetime()
- {
- EnableHamForward(g_hamplayerduck);
- new ftime; ftime = get_cvar_num("mp_freezetime");
- client_print(0, print_chat, "freezetime on, please wait: %d", ftime);
- }
- public roundstart()
- {
- DisableHamForward(g_hamplayerduck);
- client_print(0, print_chat, "freezetime off, the round start right now, (Round Num: %d)", g_countrounds);
- g_countrounds++;
- }
- public roundend()
- {
- client_print(0, print_chat, "round end, please wait for the next one");
- }
- public duckFunc()
- {
- new b; b = entity_get_int(g_id, EV_INT_button);
- if(b & IN_DUCK)
- {
- entity_set_int(g_id, EV_INT_button, b & ~IN_DUCK);
- new nick[32]; get_user_name(g_id, nick, charsmax(nick));
- client_print(0, print_chat, "duck not allowed in freezetime", nick);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement