PHP Code:
#pragma semicolon 1
#pragma newdecls required
#define MOD_TAG "\x01\x0B★ \x07[VIP Menu-]\x04 "
public Plugin myinfo =
{
name = "VIP Menu",
author = "Brum Brum",
description = "Vip Menu",
version = "1.0",
url = ""
};
public void OnPluginStart()
{
RegConsoleCmd("sm_vip", CMD_Vip);
}
public Action CMD_Vip(int client, int args)
{
if (GetUserFlagBits(client) & ADMFLAG_CUSTOM1)
{
Menu menu = new Menu(Menu_Handler);
menu.SetTitle("VIP Menu");
menu.AddItem("", "Gravity 0%");
menu.AddItem("", "Gravity 35%");
menu.AddItem("", "Gravity 70%");
menu.AddItem("", "Gravity 100%");
menu.Display(client, 60);
menu.ExitButton = true;
}
else PrintToChat(client, "%s You must have a \x07VIP\x04 to use this command", MOD_TAG);
}
public int Menu_Handler(Menu menu, MenuAction action, int client, int item)
{
if (client == 0)return;
switch (action)
{
case MenuAction_Select:
{
switch (item)
{
case 0:SetEntityGravity(client, 0.0);
case 1:SetEntityGravity(client, 0.35);
case 2:SetEntityGravity(client, 0.7);
case 3:SetEntityGravity(client, 1.0);
}
}
case MenuAction_End:delete menu;
}
}
On the 22nd line you have to set the VIP flag