Thread: [Solved] Vip sistem
View Single Post
lexzor
Veteran Member
Join Date: Nov 2020
Old 02-22-2021 , 03:20   Re: Vip sistem
Reply With Quote #2

first of all, use a boolean to check if event is on or not then hook player spawn into a function using hamsandwich library. from there you can use that function to show that menu.

here you have a little example:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandiwch>

new bool:event 

public plugin_init() {
    
    
RegisterHam(Ham_Spawn"player""menu_func"1)

}

public 
menu_func(id)
{
    if(
is_user_alive(id) && event// check if player is alive and  event is on
    
{
            
// create menu and show it to player
    
}
}

public 
HappyHourCheck()
{
        
// code to check if happy hour is on or not
        // if happy hour is on:
        
event true
        
// else
        
event false


Last edited by lexzor; 02-22-2021 at 03:22.
lexzor is offline