View Single Post
Famdl
Junior Member
Join Date: Mar 2017
Old 12-17-2017 , 17:31   Re: Request a plugin Vip Menu Jb
Reply With Quote #9

Quote:
Originally Posted by OciXCrom View Post
How does this information help?!
I think he`s just bumping his thread
Quote:
Originally Posted by F a R a Z View Post
For Counter Strike 1.6
why did you opened two threads with different accounts and Requesting one thing ?! anyway with a little search found it. This will give gravity or speed to vips on their choice. and on respawn their Gravity and speed will be normal. openmenu command /vipmenu
Persian:Faraz Jan test kon agar Taghiri mikhasti begoo anjam midam. dar zemn ghanoona ro ham re`ayat kon
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#pragma semicolon 1

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "FuckTheSchool"

#define Speed 400.0 // Must remain a float.
#define Gravity 400.0 // Must remain a float.
#define Access ADMIN_LEVEL_H // Edit the access to use /vipmenu.


new Benefited[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
RegisterHam(Ham_Spawn"player""HamBurger_Spawn");
    
    
register_clcmd("say /vipmenu""CmdVIPMenu");
}

public 
HamBurger_Spawn(id)
{
    
Benefited[id] = false;
}

public 
CmdVIPMenu(id)
{
    if(
get_user_flags(id) & Access)
    {
        if(!
Benefited[id])
        {
            new 
Format[64];
            
            new 
VIPMenu menu_create("Choose your benefits:""HandleCmdVIPMenu");

            
menu_additem(VIPMenu"Speed");
            
menu_additem(VIPMenu"400 Gravity");
                                        
            
menu_display(idVIPMenu);
            
        }
        else
            
ColorChat(id"^4You have already used your rewards!");
    }
    else
        
ColorChat(id"^4You have no access to this command!");

}

public 
HandleCmdVIPMenu(idVIPMenuitem)
{
    if(
item == MENU_EXIT) return;
    
    switch(
item+1)
    {
        case 
1set_user_maxspeed(idSpeed);
        case 
2
        {
            new 
Float:Grav Gravity/get_cvar_pointer("sv_gravity"); // Gravity will always act as 400 and will not be compared to current server gravity.
            
set_user_gravity(idGrav);
        }
    }
    
Benefited[id] = true;
}
stock ColorChat(const index, const string[], {FloatSqlResul,_}:...) 
{
    new 
msg[191], players[32], count 1;
    
    static 
len;
    
len formatex(msgcharsmax(msg), "^4[PREFIX]^1 "); // Edit the prefix here.
    
vformat(msg[len], charsmax(msg) - lenstring3);
    
    if(
index)    players[0] = index;
    else    
get_players(players,count,"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();
        }
    }


Last edited by Famdl; 12-17-2017 at 18:46. Reason: Typo
Famdl is offline