PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <fun>
#include <cstrike>
#define PLUGIN "VIP Plugin"
#define VERSION "1.0"
#define AUTHOR "Pancakez & Ex1ne :3"
new bool:aOnePrRound[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipmenu", "CmdVip")
register_clcmd("say_team /vipmenu", "CmdVip")
register_logevent( "eRoundStart", 2, "1=Round_Start" );
set_task(50.0, "Advertise")
}
public eRoundStart()
{
new iPlayers[32], iNum
get_players(iPlayers, iNum)
for(new i;i < iNum;i++)
{
aOnePrRound[iPlayers[i]] = false
}
}
public CmdVip(id)
{
if(get_user_flags(id) & ADMIN_CFG)
{
if(is_user_alive(id))
{
if(!aOnePrRound[id])
{
new menu = menu_create("[\rJailbreak\w] \yVIP:", "vip_handler")
menu_additem(menu, "Health & Armor", "1", 0)
menu_additem(menu, "Gravity", "2", 0)
menu_additem(menu, "Invisibility", "3", 0)
menu_additem(menu, "Speed()", "4", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
else ColorChat(id, GREY, "[^4VIP^3] You have allready used your vipmenu for this round.")
}
}
else ColorChat(id, GREY, "[^4VIP^3]You need to be ^4VIP^3 to enter!")
}
public vip_handler(id, menu, item)
{
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
new key = str_to_num(data);
switch(key)
{
case 1: GiveHealth(id)
case 2: GiveGravity(id)
case 3: GiveInvis(id)
case 4: GiveSpeed(id)
}
menu_destroy(menu);
return PLUGIN_HANDLED
}
public GiveHealth(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_health(id, 255)
set_user_armor(id, 255)
aOnePrRound[id] = true
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 used the ^4VIP^3 to get ^4Health & Armor^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]You need to be ^4alive^3 to use this!")
}
public GiveGravity(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_gravity(id, 0.4)
aOnePrRound[id] = true
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 used the ^4VIP^3 to get ^4Gravity^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]You need to be ^4alive^3 to use this!")
}
public GiveInvis(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_rendering(id,kRenderFxGlowShell,0,0, 0,kRenderTransAlpha, 30);
aOnePrRound[id] = true
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 used the ^4VIP^3 to get ^4Invisibility^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]You need to be ^4alive^3 to use this!")
}
public GiveSpeed(id)
{
new iName[33]
get_user_name(id, iName, 31)
if(is_user_alive(id))
{
set_user_maxspeed(id, 520.0)
aOnePrRound[id] = true
ColorChat(0, GREY, "[^4VIP^3] ^4%s^3 used the ^4VIP^3 to get ^4Speed^3!")
}
else ColorChat(id, GREY, "[^4VIP^3]You need to be ^4alive^3 to use this!")
}