Raised This Month: $ Target: $400
 0% 

Plugin vip menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BolinhosS
Junior Member
Join Date: Jul 2014
Old 08-14-2014 , 21:09   Plugin vip menu
Reply With Quote #1

I needed a vip menu Jailbreak. please help me now ;D.
BolinhosS is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-14-2014 , 21:25   Re: Plugin vip menu
Reply With Quote #2

You can try any of this:
PHP Code:
#pragma semicolon 1 

#include <amxmodx> 
#include <cstrike> 
#include <engine> 
#include <fun> 
#include <hamsandwich> 

#define PLUGIN "[JB] VIP" 
#define VERSION "1.0" 
#define AUTHOR "eRdeneR" 

#define ADMIN_JBVIP ADMIN_KICK 

new const PREFIX[] = { "!g[JailBreak]!n" }; 

new 
VipUsed[33]; 
new 
HasSpeed

new 
Float:fast_speed 400.0
new 
Float:normal_speed 250.0

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR); 

    
RegisterHam(Ham_Spawn"player""FwdHamSpawn_Post"); 
    
RegisterHam(Ham_Item_PreFrame"player""FwdPreFrame_Post"); 
     
    
register_clcmd("say /vipmenu""cmdVmenu"); 
    
register_clcmd("say /vmenu""cmdVmenu"); 
    
register_clcmd("say_team /vipmenu""cmdVmenu"); 
    
register_clcmd("say_team /vmenu""cmdVmenu"); 


public 
FwdPreFrame_Post(id

    if(!
is_user_alive(id)) 
    { 
        return 
PLUGIN_HANDLED
    } 

    if(!
HasSpeed
    { 
        return 
PLUGIN_HANDLED
    } 
     
    else if(
HasSpeed
    { 
        
set_user_maxspeed(idfast_speed); 
    } 
     
    return 
PLUGIN_HANDLED


public 
FwdHamSpawn_Post(id

    
HasSpeed false
    
VipUsed[id] = false
    
set_user_maxspeed(idnormal_speed); 
    
set_user_renderingid_000_);  
    
set_user_footsteps(id0


public 
cmdVmenu(id

    if(
is_user_alive(id) && get_user_flags(id) & ADMIN_JBVIP && !( VipUsed[id] ) ) 
    { 
        
VipMenu(id); 
    } 
     
    else if(
VipUsed[id]) 
    { 
        
client_printc(id"%s You already used !gVIP Menu!n this round. Please wait till next round"PREFIX); 
    } 
     
    else 
    { 
        
client_printc(id"%s Only !gVIPs!n that are !gTerrorist!n or !gCounter Terrorist!n may use the VIP Menu"PREFIX); 
        return 
PLUGIN_HANDLED
    } 
     
    return 
PLUGIN_HANDLED


public 
VipMenu(id

    new 
menu menu_create("\yJailBreak VIP Menu:^n\rby eRdeneR""VipMenu_handler"); 

    
menu_additem(menu"\wGravity""1"0); 
    
menu_additem(menu"\wInvisiblity""2"0); 
    
menu_additem(menu"\wSpeed""3"0); 
    
menu_additem(menu"\w1 Bullet Deagle""4"0); 
    
menu_additem(menu"\wGrenades""5"0); 
    
menu_additem(menu"\wHealth""6"0); 
     
    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
    
menu_display(idmenu0); 


public 
VipMenu_handler(idmenuitem

    if( 
item == MENU_EXIT 
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED
    } 

    new 
data[6], iName[64]; 
    new 
accesscallback
    
menu_item_getinfo(menuitemaccessdata,5iName63callback); 

    new 
key str_to_num(data); 

    switch(
key
    { 
        case 
1
        { 
            
set_user_gravity(id0.4375); 
            
VipUsed[id] = true
             
            
client_printc(id"%s You have just recieved !gGravity!n"PREFIX); 
        } 
        case 
2
        { 
            
set_user_rendering(idkRenderFxNone505050kRenderTransAdd50);
            
set_user_footsteps(id1); 
            
VipUsed[id] = true
             
            
client_printc(id"%s You have just recieved an !gInvisibility!n"PREFIX); 
        } 
        case 
3
        { 
            
VipUsed[id] = true
            
HasSpeed true
            
set_user_maxspeed(idfast_speed); 
             
            
client_printc(id"%s You have just recieved !gSpeed!n"PREFIX); 
        } 
        case 
4
        { 
            
cs_set_weapon_ammo(give_item(id"weapon_deagle"), 1); 
             
            
client_printc(id"%s You have just recieved !g1 Bullet Deagle!n"PREFIX); 
        } 
        case 
5
        { 
            
give_item(id"weapon_hegrenade"); 
            
give_item(id"weapon_flashbang"); 
            
give_item(id"weapon_flashbang"); 
            
give_item(id"weapon_smokegrenade"); 
             
            
client_printc(id"%s You Have just recieved !gGrenades!n"PREFIX); 
        } 
        case 
6
        { 
            
set_user_health(id200)
            
client_printc(id"%s You have just recieved !gHealth!n"PREFIX); 
        } 
    } 

    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED



stock client_printc(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg190input3); 
     
    
replace_all(msg190"!n""^x01"); // Default Renk(Sarı) 
    
replace_all(msg190"!g""^x04"); // Yeşil Renk 
    
replace_all(msg190"!t""^x03"); // Takım Renk( CT mavi , T kırmızı ) 
     
    
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(); 
            } 
        } 
    } 

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "JailBreak Vip"
#define VERSION "1.0"
#define AUTHOR "OxYgEn"
#define JB_VIP ADMIN_LEVEL_H

new const saychatprefix[] = "[Jailbreak]";
new 
menu;
new 
used[33];
new 
Time[33]
new 
g_HudSync

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /vipmenu","cmd_vip"0)
    
RegisterHam(Ham_Spawn"player""player_spawn"1)
    
    
cvar_time register_cvar("zp_stealth_time""45"// The time given for stealth
    
    
g_HudSync CreateHudSyncObj()
}

public 
player_spawn(id)
{
    if(
is_user_alive(id))
    {
        
used[id] = false
        set_user_rendering
(idkRenderFxGlowShell000kRenderTransAlpha255);
        
set_user_footsteps(id0);
    }
}

public 
cmd_vip(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & JB_VIP)
    {
        
cmd_vipshop(id)
    }
    else
    {
        
client_printc(id"%s !tYou must be alive or !gVIP !tto select this menu!"saychatprefix)
    }
}

public 
cmd_vipshop(id)
{
    if(
used[id])
    {
        
client_printc(id"%s !gYou can select an item once per round"saychatprefix)
        return 
PLUGIN_HANDLED;
    }
    
    
menu menu_create("\r[Jailbreak]Vip Menu^nBy OxYgEn:""vip_handler");
    
menu_additem(menu"350 Gravity""1"0);
    
menu_additem(menu"Stealth""2"0);
    
menu_additem(menu"Speed""3"0);
    
menu_additem(menu"Deagle with 1 bullet""4"0);
    
menu_additem(menu"Grenades Pack""5"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
    return 
PLUGIN_HANDLED
}

public 
vip_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            
set_user_gravity(id0.4375);
            
client_printc(id"%s !gYour gravity have been lowered!"saychatprefix);
        }
        case 
2:
        {
            
set_user_rendering(idkRenderFxNone505050kRenderTransAdd50);
            
set_user_footsteps(id1);
            
client_printc(id"%s !gYou have selected stealth ability!"saychatprefix);
            
Time[id] = get_pcvar_num(cvar_time)
            
CountDown(id)
        }
        case 
3:
        {
            
set_user_maxspeed(id500.0);
            
client_printc(id"%s !gYour speed have been increased!"saychatprefix);
        }
        case 
4:
        {
            
cs_set_weapon_ammogive_item(id"weapon_deagle"), 1);
            
cs_set_user_bpammoidCSW_DEAGLE);
            
client_printc(id"!%s gYou have recieved deagle with 1 bullet!"saychatprefix);
        }
        case 
5:
        {
            
give_item(id"weapon_smokegrenade");
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_hegrenade");
            
client_printc(id"%s !gYou have recieved a grenades pack!"saychatprefix);
        }
    }
    
used[id] = true;
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
CountDown(id)
{
    if(
Time[id] <= 0)
    {        
        if(
is_user_alive(id))
        {
            
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha255);
            
set_user_footsteps(id0);
        }
        return
    }
    
    
Time[id]--
    
    
set_hudmessage(85127255, -1.00.1510.13.00.050.05, -1)
    
ShowSyncHudMsg(idg_HudSync"Time remaining for stealth: %d seconds."Time[id])
    
set_task(1.0"CountDown"id)
}

public 
client_putinserver(id
{
    
set_task(2.0"Welcome_Message"id);
}

public 
Welcome_Message(id)
{
    if(
is_user_alive(id) && get_user_flags(id) & JB_VIP)
    {
        new 
szName[32];
        
get_user_name(idszNamecharsmax(szName)) 
        
client_printc(0"!gVIP !tplayer !n^"%s^" !gconnected!"szName);
    }
    return 
PLUGIN_HANDLED;
}

// Colour Chat 2
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();
            }
        }
    }

What can you edit? (This is only for the second code):
Quote:
cvar_time = register_cvar("zp_stealth_time", "45") // The time given for stealth

Last edited by zmd94; 08-16-2014 at 13:25.
zmd94 is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-15-2014 , 01:44   Re: Plugin vip menu
Reply With Quote #3

The second one is badly coded and I wouldn't suggest it. Will mention some of the errors: no check if user is alive in ham_spawn before setting footsteps and this:
PHP Code:
get_user_name(idszNamesizeof(szName)) 
then this:
PHP Code:
client_printc(id"!gYou selected grenades pack!"saychatprefix
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-15-2014 , 02:49   Re: Plugin vip menu
Reply With Quote #4

Quote:
Originally Posted by Flick3rR View Post
The second one is badly coded and I wouldn't suggest it. Will mention some of the errors: no check if user is alive in ham_spawn before setting footsteps and this:
PHP Code:
get_user_name(id,  szNamesizeof(szName)) 
Then this:
PHP Code:
client_printc(id"!gYou  selected grenades pack!"saychatprefix
Thank you for correcting me. I have mislooked that thing. ;)

I will edit the code.
zmd94 is offline
Lordslv
Junior Member
Join Date: Aug 2014
Location: Kappa
Old 08-15-2014 , 04:49   Re: Plugin vip menu
Reply With Quote #5

Can someone make Stealth for some seconds not for all round? like 10seconds and then u are vissable again
Lordslv is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-15-2014 , 05:06   Re: Plugin vip menu
Reply With Quote #6

@ Lordslv, which code do you use?
zmd94 is offline
BolinhosS
Junior Member
Join Date: Jul 2014
Old 08-15-2014 , 11:02   Re: Plugin vip menu
Reply With Quote #7

Someone could add 200 HP to the VIP menu please?
BolinhosS is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-15-2014 , 11:12   Re: Plugin vip menu
Reply With Quote #8

@ BolinhosS, which code do you use? The first or the second code?
zmd94 is offline
BolinhosS
Junior Member
Join Date: Jul 2014
Old 08-15-2014 , 11:15   Re: Plugin vip menu
Reply With Quote #9

The first cmd
BolinhosS is offline
BolinhosS
Junior Member
Join Date: Jul 2014
Old 08-15-2014 , 11:19   Re: Plugin vip menu
Reply With Quote #10

zmd* and if it were possible to remove the case 6 "Exit"
BolinhosS 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 14:40.


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