Raised This Month: $32 Target: $400
 8% 

Free Vip between 20:00 & 09:00


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alicx
BANNED
Join Date: Mar 2013
Location: Tunisia
Old 04-15-2013 , 12:29   Free Vip between 20:00 & 09:00
Reply With Quote #1

Hello,
can some one make a plugin tha give free vip between 20:00 and 09:00 , please
and if possible :
*add two cvars that controle the time of start and the time of the end (the strat and end of free vip)
*every 25 seconds it print : [VIP System]You can get free vip between (*the hour of start) and (the hour of end)
*control the time of the print by cvar

the include of the vip sytem that i use:

Code:
/* Access flags */
#define VIP_FLAG_ALL 0      // Any flag
#define VIP_FLAG_A (1<<0)   // Flag "a"
#define VIP_FLAG_B (1<<1)   // Flag "b"
#define VIP_FLAG_C (1<<2)   // Flag "c"
#define VIP_FLAG_D (1<<3)   // Flag "d"
#define VIP_FLAG_E (1<<4)   // Flag "e"
#define VIP_FLAG_F (1<<5)   // Flag "f"
#define VIP_FLAG_G (1<<6)   // Flag "g"
#define VIP_FLAG_H (1<<7)   // Flag "h"
#define VIP_FLAG_I (1<<8)   // Flag "i"
#define VIP_FLAG_J (1<<9)   // Flag "j"
#define VIP_FLAG_K (1<<10)  // Flag "k"
#define VIP_FLAG_L (1<<11)  // Flag "l"
#define VIP_FLAG_M (1<<12)  // Flag "m"
#define VIP_FLAG_N (1<<13)  // Flag "n"
#define VIP_FLAG_O (1<<14)  // Flag "o"
#define VIP_FLAG_P (1<<15)  // Flag "p"
#define VIP_FLAG_Q (1<<16)  // Flag "q"
#define VIP_FLAG_R (1<<17)  // Flag "r"
#define VIP_FLAG_S (1<<18)  // Flag "s"
#define VIP_FLAG_T (1<<19)  // Flag "t"
#define VIP_FLAG_U (1<<20)  // Flag "u"
#define VIP_FLAG_V (1<<21)  // Flag "v"
#define VIP_FLAG_W (1<<22)  // Flag "w"
#define VIP_FLAG_X (1<<23)  // Flag "x"
#define VIP_FLAG_Y (1<<24)  // Flag "y"
#define VIP_FLAG_Z (1<<25)  // Flag "z"

/* Returns 1 if player is VIP, otherwise 0 */
native VSGetUserVip(id)

/* Returns 1 if player have a flag, otherwise 0 */
native VSGetVipFlag(id, flag)

/* Returns flags the player as sum of bits */
native VSGetVipFlags(id)

/* Register new item
Parameters: 
	name - item name
	flag - access flag
Returns:
	id of item
*/
native VSRegisterItem(name[], flag)

/* Returns 1 if the privilege is enabled, otherwise 0 */
native VSGetItemState(id)

/* Activate the privilege on the menu */
native VSEnableItem(id)

/* Disables the privilege of the menu */
native VSDisableItem(id)

/* Sets the privileges name of the menu */
native VSSetItemName(id, name[])

/* Called when the player has chosen an element */
forward VSItemSelected(id, itemid)

/* Called when a VIP connects */
forward VSVipConnect(id)

/* Called when player opening menu */
forward VSOpeningMenu(id)

Last edited by alicx; 04-15-2013 at 12:31.
alicx is offline
Send a message via MSN to alicx Send a message via Skype™ to alicx
Unkolix
Veteran Member
Join Date: Sep 2012
Old 04-15-2013 , 14:10   Re: Free Vip between 20:00 & 09:00
Reply With Quote #2

I believe someone can edit this plugin someone has made me. Edit it by your needs. I am too lazy now.

PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Free VIP"
#define VERSION "1.0"
#define AUTHOR "Chakalaka In You. Boom Boom"

new g_FreeVip[33];
new 
g_Time_1g_Time_2

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_Time_1 register_cvar("free_vip_time_from""20")
    
g_Time_2 register_cvar("free_vip_time_to""09")
    
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
    
register_dictionary("free_vip.txt");
}

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(idADMIN_USER);
            
set_user_flags(idADMIN_LEVEL_H);
            
g_FreeVip[id] = true;
            
set_hudmessage255255255, -1.00.8700.012.00.10.2, -);
            
show_hudmessage id"%L"id"FREE_VIP"Time_1Time_2)
        }
    }
    else if( 
00 <= iTime <= 09 )
    {
        if( !(
get_user_flags(id) & ADMIN_RESERVATION) )
        {
            
remove_user_flags(idADMIN_USER);
            
set_user_flags(idADMIN_LEVEL_H);
            
g_FreeVip[id] = true;
            
set_hudmessage255255255, -1.00.8700.012.00.10.2, -);
            
show_hudmessage id"%L"id"FREE_VIP"Time_1Time_2)
        }
    }
    else if( 
g_FreeVip[id] )
    {
        
remove_user_flags(idADMIN_LEVEL_H);
        
set_user_flags(idADMIN_USER);
        
g_FreeVip[id] = false;
    }

Unkolix is offline
alicx
BANNED
Join Date: Mar 2013
Location: Tunisia
Old 04-16-2013 , 01:38   Re: Free Vip between 20:00 & 09:00
Reply With Quote #3

Quote:
Originally Posted by Unkolix View Post
I believe someone can edit this plugin someone has made me. Edit it by your needs. I am too lazy now.

PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "Free VIP"
#define VERSION "1.0"
#define AUTHOR "Chakalaka In You. Boom Boom"

new g_FreeVip[33];
new 
g_Time_1g_Time_2

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_Time_1 register_cvar("free_vip_time_from""20")
    
g_Time_2 register_cvar("free_vip_time_to""09")
    
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
    
    
register_dictionary("free_vip.txt");
}

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(idADMIN_USER);
            
set_user_flags(idADMIN_LEVEL_H);
            
g_FreeVip[id] = true;
            
set_hudmessage255255255, -1.00.8700.012.00.10.2, -);
            
show_hudmessage id"%L"id"FREE_VIP"Time_1Time_2)
        }
    }
    else if( 
00 <= iTime <= 09 )
    {
        if( !(
get_user_flags(id) & ADMIN_RESERVATION) )
        {
            
remove_user_flags(idADMIN_USER);
            
set_user_flags(idADMIN_LEVEL_H);
            
g_FreeVip[id] = true;
            
set_hudmessage255255255, -1.00.8700.012.00.10.2, -);
            
show_hudmessage id"%L"id"FREE_VIP"Time_1Time_2)
        }
    }
    else if( 
g_FreeVip[id] )
    {
        
remove_user_flags(idADMIN_LEVEL_H);
        
set_user_flags(idADMIN_USER);
        
g_FreeVip[id] = false;
    }

thanks a lot but wher i place "free_vip.txt" ??
in data/lang
or cstrike/
?????
and can you add it in your post ?
alicx is offline
Send a message via MSN to alicx Send a message via Skype™ to alicx
Unkolix
Veteran Member
Join Date: Sep 2012
Old 04-16-2013 , 08:29   Re: Free Vip between 20:00 & 09:00
Reply With Quote #4

You can just delete the
PHP Code:
register_dictionary("free_vip.txt"); 
line and edit those lines:
PHP Code:
show_hudmessage id"%L"id"FREE_VIP"Time_1Time_2
PHP Code:
show_hudmessage id"You get FREE VIP from %d:00 to %d:00!"Time_1Time_2
Unkolix is offline
alicx
BANNED
Join Date: Mar 2013
Location: Tunisia
Old 04-16-2013 , 08:39   Re: Free Vip between 20:00 & 09:00
Reply With Quote #5

Quote:
Originally Posted by Unkolix View Post
You can just delete the
PHP Code:
register_dictionary("free_vip.txt"); 
line and edit those lines:
PHP Code:
show_hudmessage id"%L"id"FREE_VIP"Time_1Time_2
PHP Code:
show_hudmessage id"You get FREE VIP from %d:00 to %d:00!"Time_1Time_2
ok thanks but how can i chage the Flags of vip ??
please edit it (to work wwith the include that i have gived you )
alicx is offline
Send a message via MSN to alicx Send a message via Skype™ to alicx
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 04-16-2013 , 12:15   Re: Free Vip between 20:00 & 09:00
Reply With Quote #6

remove_user_flags(id, ADMIN_USER);
set_user_flags(id, ADMIN_LEVEL_H);


it will change the player's flag 'Flag Z' to ADMIN_LEVEL_H


what flag you want for the free vip players, make it.

Last edited by sami_spt; 04-16-2013 at 12:16.
sami_spt is offline
Pootisbird
Junior Member
Join Date: Jan 2013
Location: Germany
Old 04-16-2013 , 12:22   AW: Free Vip between 20:00 & 09:00
Reply With Quote #7

::
__________________


Pootisbird is offline
alicx
BANNED
Join Date: Mar 2013
Location: Tunisia
Old 04-16-2013 , 13:31   Re: Free Vip between 20:00 & 09:00
Reply With Quote #8

Quote:
Originally Posted by sami_spt View Post
remove_user_flags(id, ADMIN_USER);
set_user_flags(id, ADMIN_LEVEL_H);


it will change the player's flag 'Flag Z' to ADMIN_LEVEL_H


what flag you want for the free vip players, make it.
no look at the include
the flags are different
alicx is offline
Send a message via MSN to alicx Send a message via Skype™ to alicx
Unkolix
Veteran Member
Join Date: Sep 2012
Old 04-16-2013 , 14:33   Re: Free Vip between 20:00 & 09:00
Reply With Quote #9

Quote:
Originally Posted by alicx View Post
no look at the include
the flags are different
Quote:
Originally Posted by sami_spt View Post
what flag you want for the free vip players
Unkolix is offline
Jockey
Member
Join Date: Nov 2008
Location: Germany
Old 04-27-2013 , 05:16   Re: Free Vip between 20:00 & 09:00
Reply With Quote #10

What i must write if i want free vip from 10-11 and again from 20-21 ?

Like Happy Hour
Jockey is offline
Reply


Thread Tools
Display Modes

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 04:34.


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