Please correct my vip menu if it's not good. (I'm bad at English.) And please put a delay code after 16second of round start..
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <zombieplague.inc>
public plugin_init()
{
register_plugin("ZM VIP MENU", "0.0.1", "Q.das")
register_logevent("Round_Start", 14, "1=Round_Start")
register_menucmd(register_menuid("menu_rod"), 1023, "Pressedrod")
}
public Round_Start()
{
new players[32], pnum
get_players(players, pnum, "a")
for (new i = 0; i < pnum; i++)
{
new player = players[i]
if (get_user_flags(player) & ADMIN_LEVEL_H)
{
ShowmenuID(player)
}
}
return PLUGIN_HANDLED
}
public ShowmenuID(id)
{
new Body[512]
new CsTeams:iTeam = cs_get_user_team(id)
if (iTeam == CS_TEAM_T)
{
add(Body, 511, "\rVIP Menu: \R\dZombie^n^n")
add(Body, 511, "\r1. \w9000hp^n")
add(Body, 511, "\r0. \wExit^n")
}
else if (iTeam == CS_TEAM_CT)
{
add(Body, 511, "\rVIP Menu: \R\dSurviver^n^n")
add(Body, 511, "\r1. \w+100 Sarvu^n")
add(Body, 511, "\r2. \w+250 Gyvybiu^n")
add(Body, 511, "\r3. \wG3SG1 Auto-Sniper + 35 Sarvu^n")
add(Body, 511, "\r4. \wM249 + 150 Gyvybiu^n")
add(Body, 511, "\r0. \wExit^n")
}
new g_Keys = (1<<0 | 1<<1 | 1<<9)
show_menu(id, g_Keys, Body, -1, "menu_rod")
return PLUGIN_CONTINUE
}
public Pressedrod(id, key)
{
new CsTeams:iTeam = cs_get_user_team(id)
switch(key)
{
case 0:
{
if (iTeam == CS_TEAM_T)
{
set_user_health(id, 9000)
client_print(id, print_chat, "VIP ## You are with 9'000 health points.")
client_print(id, print_chat, "VIP ## You are with 9'000 health points.")
}
else if (iTeam == CS_TEAM_CT)
{
set_user_armor(id, 100)
client_print(id, print_chat, "VIP ## You get 100 armor.")
client_print(id, print_chat, "VIP ## You get 100 armor.")
}
}
case 1:
{
if (iTeam == CS_TEAM_T)
{
give_item(id, "weapon_knife")
}
else if (iTeam == CS_TEAM_CT)
{
set_user_health(id, 370)
client_print(id, print_chat, "VIP ## You are with 370 health.")
client_print(id, print_chat, "VIP ## You are with 370 health.")
}
}
case 2:
{
if (iTeam == CS_TEAM_T)
{
give_item(id, "weapon_knife")
}
else if (iTeam == CS_TEAM_CT)
{
give_item(id, "weapon_g3sg1")
cs_set_user_bpammo(id, CSW_G3SG1, 90)
set_user_armor(id, 35)
client_print(id, print_chat, "VIP ## You get a super sniper and 35 armor.")
client_print(id, print_chat, "VIP ## You get a super sniper and 35 armor.")
}
}
case 3:
{
if (iTeam == CS_TEAM_T)
{
give_item(id, "weapon_knife")
}
else if (iTeam == CS_TEAM_CT)
{
give_item(id, "weapon_m249")
cs_set_user_bpammo(id, CSW_M249, 200)
set_user_health(id, 150)
client_print(id, print_chat, "VIP ## You get a machinegun and 150health.")
client_print(id, print_chat, "VIP ## You get a machinegun and 150health.")
}
}
default: return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}