Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #define AUTHOR "aSior - amxx.pl/user/60210-asior/"
- new const happyHours[] = { 0, 24 }
- new const vipFlag[] = "t";
- new const svipFlag[] = "s";
- new currentTime[4], bool:happyHourEnabled, currentHour;
- public plugin_init()
- {
- register_plugin("x", "v0.1", AUTHOR);
- get_time("%H", currentTime, charsmax(currentTime));
- currentHour = str_to_num(currentTime);
- if(happyHours[0] <= currentHour <= happyHours[1])
- happyHourEnabled = true;
- }
- public client_authorized(index)
- {
- if(!happyHourEnabled || get_user_flags(index) & read_flags(svipFlag))
- return;
- new newFlags = get_user_flags(index) | read_flags(vipFlag);
- set_user_flags(index, newFlags);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement