Raised This Month: $ Target: $400
 0% 

JB Vip Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
JoaoVieira
Senior Member
Join Date: May 2013
Location: Portugal
Old 02-05-2016 , 10:57   JB Vip Plugin
Reply With Quote #1

When i say /vmenu it shows i dont have vip but actually i had all flags

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new bool:gMenu[32]
new const 
PREFIX[] = { "!g[SMART TEAM PORTUGAL]!n" };

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Spawn"player""player_spawn"1)
    
register_clcmd("say vmenu""cmdVmenu");
    
register_clcmd("say /vmenu""cmdVmenu");
    
register_clcmd("say_team vmenu""cmdVmenu");
    
}
public 
player_spawn(idgMenu[id] = false

public cmdVmenu(id)
{
    if(
gMenu[id])
    {
        
client_printc(id"%s Tu ja usas-te o !gVIP Menu!n esta ronda. So consegues usar na proxima ronda outravez."PREFIX);
    }
    
    else
    {
        
client_printc(id"%s So os !gVIP's!n e que conseguem usar este !gmenu vip!n"PREFIX);
        return 
PLUGIN_HANDLED;
    }
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    {
        
client_printc(id"%s So podes usar este !gMenu Vip!n se fores !tPrisioneiro!n!"PREFIX);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;
}
public 
vip_menu(id)
{
    if(
gMenu[id])
    return 
PLUGIN_HANDLED
    
if(get_user_flags(id) & ADMIN_RESERVATION && cs_get_user_team(id) == CS_TEAM_T )
    {
        new 
Menu menu_create"\r[SMART TEAM PORTUGAL]\yVIP Menu""vip_Handler" );               
        
menu_additemMenu"Glock com 3 Balas""0" );
        
menu_additemMenu"50 HP & 100 Armor""1" );
        
menu_additemMenu"He grenade""2" );
        
menu_additemMenu"Flashbang""3" );
        
menu_displayidMenu);
        
    }
    return 
PLUGIN_HANDLED
}
public 
vip_HandleridMenuiItem)
{
    if( 
iItem == MENU_EXIT )
    {
        
menu_destroyMenu );
        return 
PLUGIN_HANDLED;
    }
    new 
szData];
    new 
iAccesshCallback;
    
    
menu_item_getinfoMenuiItemiAccessszData5__hCallback );
    
    switch( 
str_to_numszData ) )
    {
        case 
0:
        {
            
give_item(id,"weapon_glock18")
            
cs_set_user_bpammoidCSW_GLOCK18);
        }
        case 
1:
        {
            
set_user_armor(id,200)
            
set_user_health(id,200)
        }
        case 
2give_item(id,"weapon_hegrenade")
        case 
3give_item(id,"weapon_flashbang")
    }
    return 
PLUGIN_HANDLED;
}
stock client_printc(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^x04"); // Green Color
    
replace_all(msg190"!n""^x01"); // Default Color
    
replace_all(msg190"!t""^x03"); // Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
{
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }
}

WHATS WRONG?

Last edited by JoaoVieira; 02-05-2016 at 10:59.
JoaoVieira 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 09:20.


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