Getting some errors in compile....
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include < zombieplague >
new g_pKillAmmo
new g_iMaxPlayers;
public plugin_init( ) {
register_plugin( "Plugin", "1.0", "noauthor" );
register_logevent("Round_Start", 2, "1=Round_Start")
register_logevent( "EventRoundEnd", 2, "1=Round_End" )
register_menucmd(register_menuid("menu_rod"), 1023, "Pressedrod")
g_iMaxPlayers = get_maxplayers( );
g_pKillAmmo = register_cvar( "zpvip_kill_ammo", "2" );
register_event( "DeathMsg", "death_msg", "a" );
}
public Round_Start()
{
new players[32], pnum, player
get_players(players, pnum, "a")
for (new i = 0; i < pnum; i++)
{
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\dTe rro r ist^n^n")
add(Body, 511, "\r1. \w5HP/s^n")
add(Body, 511, "\r2. \w255HP^n")
add(Body, 511, "\r0. \wExit^n")
}
else if (iTeam == CS_TEAM_CT)
{
add(Body, 511, "\rVIP Menu: \R\dCoun te r-Te rro r ist^n^n")
add(Body, 511, "\r1. \w3HP/s^n")
add(Body, 511, "\r2. \w200HP^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)
{
if(is_user_alive(id))
{
new hp = get_user_health(id);
if(hp < 3500)
{
set_task(1.0,"gydytojas", id)
}
}
}
else if (iTeam == CS_TEAM_CT)
{
if(is_user_alive(id))
{
new hp = get_user_health(id);
if(hp < 250)
{
set_task(1.0,"gydytojas2", id)
}
}
}
case 1:
{
if (iTeam == CS_TEAM_T)
{
set_user_health(id, 255)
client_print(id, print_center, ".:: You have been healed +255 hp ::.")
}
else if (iTeam == CS_TEAM_CT)
{
set_user_health(id, 200)
client_print(id, print_center, ".:: You have been healed +200 hp ::.")
}
}
default: return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public death_msg( ) {
new iAttacker = read_data( 1 );
if( get_user_flags( iAttacker ) & ADMIN_LEVEL_H )
zp_set_user_ammo_packs( iAttacker, zp_get_user_ammo_packs( iAttacker ) + get_pcvar_num( g_pKillAmmo ) );
}
public gydytojas(id) {
if( !is_user_alive( id ) )
{
return PLUGIN_CONTINUE;
}
new hp = get_user_health(id);
if(hp < 3500)
{
set_user_health(id, hp + 5);
set_task(1.0,"gydytojas", id);
}
else
{
client_print(id, print_chat, "Daugiau HP nebegausi :)")
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public gydytojas2(id) {
if( !is_user_alive( id ) )
{
return PLUGIN_CONTINUE;
}
new hp = get_user_health(id);
if(hp < 250)
{
set_user_health(id, hp + 3);
set_task(1.0,"gydytojas2", id);
}
else
{
client_print(id, print_chat, "Daugiau HP nebegausi :)")
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public EventRoundEnd( )
{
for( new i = 1; i <= g_iMaxPlayers; i++ )
{
remove_task( i );
}
}