Raised This Month: $ Target: $400
 0% 

Vip free from 23:00 till 11:00


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MaXs
Member
Join Date: Jan 2017
Old 01-24-2017 , 05:45   Re: Vip free from 23:00 till 11:00
Reply With Quote #10

Compile yourself or 23to11.amxx


CODE:
Quote:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Free VIP"
#define VERSION "0.1"
#define AUTHOR "XTCS"

new g_FreeVip[33];
new g_Time_1, g_Time_2

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

g_Time_1 = register_cvar("free_vip_time_from", "23")
g_Time_2 = register_cvar("free_vip_time_to", "11")

RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

}

public fwHamPlayerSpawnPost(id)
{
new szTime[3]
get_time("%H",szTime,2)

new Time_1 = get_pcvar_num(g_Time_1)
new Time_2 = get_pcvar_num(g_Time_2)

new iTime = str_to_num(szTime)
if( 20 <= iTime <= 24 )
{
if( !(get_user_flags(id) & ADMIN_RESERVATION) )
{
remove_user_flags(id, ADMIN_USER);
set_user_flags(id, ADMIN_LEVEL_H);
g_FreeVip[id] = true;
set_hudmessage( 255, 255, 255, -1.0, 0.87, 0, 0.0, 12.0, 0.1, 0.2, -1 );
show_hudmessage ( id, "You get FREE VIP from %d:00 to %d:00!", Time_1, Time_2)
}
}
else if( 00 <= iTime <= 09 )
{
if( !(get_user_flags(id) & ADMIN_RESERVATION) )
{
remove_user_flags(id, ADMIN_USER);
set_user_flags(id, ADMIN_LEVEL_H);
g_FreeVip[id] = true;
set_hudmessage( 255, 255, 255, -1.0, 0.87, 0, 0.0, 12.0, 0.1, 0.2, -1 );
show_hudmessage ( id, "You get FREE VIP from %d:00 to %d:00!", Time_1, Time_2)
}
}
else if( g_FreeVip[id] )
{
remove_user_flags(id, ADMIN_LEVEL_H);
set_user_flags(id, ADMIN_USER);
g_FreeVip[id] = false;
}
}
MaXs is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode