T MENU: Gravity 5 sec GODMODE 5 sec Speed 10 sec Nematomumas 10 sec 120 HP 2x FB, HE, SG
CT MENU: Gravity 5 sec GODMODE 5 sec Speed 10 sec Nematomumas 10 sec 120 HP 250 AP
Yra klaida su forumo , tai tikslus link čia: http://pastebin.com/xpGwVcnX
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <fun>
new gmsgSayText
static const COLOR[] = "^x04" //green
#define PLUGIN "VIP HNS"
#define VERSION "1.0"
#define AUTHOR "ArtHa"
#define VIP ADMIN_LEVEL_H
new bool:g_speed[33]
new g_event_weapon[ 33 ];
new players[32], player, pnum
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("LogEvent_RoundStart", 2, "1=Round_Start" );
register_event( "CurWeapon", "event_CurWeapon", "be", "1=1" );
register_clcmd("say", "handle_say")
register_clcmd("say_team", "handle_say")
gmsgSayText = get_user_msgid("SayText")
}
public LogEvent_RoundStart()
{
get_players(players, pnum, "a");
for(new i = 0; i < pnum; i++)
player = players[i];
if(is_user_alive(player) && get_user_flags(player) & VIP)
{
if(cs_get_user_team(player) == CS_TEAM_T)
{
vipmenu(player);
}
if(cs_get_user_team(player) == CS_TEAM_CT)
{
vipmenu2(player);
}
}
return PLUGIN_HANDLED
}
public remove_menu(id)
{
client_cmd(id, "slot10" );
}
public vipmenu(id)
{
set_task(20.0, "remove_menu", id);
new menu = menu_create("\w[\yVIP MENU\w]", "menu_handler");
menu_additem(menu, "\wGravity \y5\w sec", "1", 0);
menu_additem(menu, "\wGODMODE \y5\w sec", "2", 0);
menu_additem(menu, "\wSpeed \y10\w sec", "3", 0);
menu_additem(menu, "\wNematomumas \y10\w sec", "4", 0);
menu_additem(menu, "\y120\w HP", "5", 0);
menu_additem(menu, "\y2\w x FB, HE, SG", "6", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0);
}
public vipmenu2(id)
{
set_task(20.0, "remove_menu", id);
new menu = menu_create("\w[\yVIP MENU\w]", "menu_handler");
menu_additem(menu, "\wGravity \y5\w sec", "1", 0);
menu_additem(menu, "\wGODMODE \y5\w sec", "2", 0);
menu_additem(menu, "\wSpeed \y10\w sec", "3", 0);
menu_additem(menu, "\wNematomumas \y10\w sec", "4", 0);
menu_additem(menu, "\y120\w HP", "5", 0);
menu_additem(menu, "\y250\w AP", "7", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0);
}
public menu_handler(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new acess, callback;
menu_item_getinfo(menu, item, acess, data,6, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
set_task(0.1, "setGravity", id);
set_task(5.1, "removeGravity", id);
}
case 2:
{
set_pev( id, pev_takedamage, 0.0 );
set_task( 5.0, "remove_god", id );
}
case 3:
{
g_speed[id] = true;
set_pev( id, pev_maxspeed, float( 320 ) );
set_task( 10.0, "remove_speed", id );
}
case 4:
{
set_pev( id, pev_renderfx, kRenderFxNone );
set_pev( id, pev_rendercolor, { 0.0, 0.0, 0.0 } );
set_pev( id, pev_rendermode, kRenderTransTexture );
set_pev( id, pev_renderamt, 0.0 );
set_task( 10.0, "matomas", id );
}
case 5:
{
set_user_health(id, get_user_health(id) +20)
}
case 6:
{
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
}
case 7:
{
set_user_armor(id, 250)
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public setGravity(id)
{
set_pev( id, pev_gravity, float( 700 ) / float( get_cvar_num( "sv_gravity" ) ) );
}
public removeGravity(id)
{
set_pev( id, pev_gravity, float( 800 ) / float( get_cvar_num( "sv_gravity" ) ) );
}
public remove_god(id)
{
set_pev(id, pev_takedamage, 1.0 );
}
public event_CurWeapon( id )
{
if(get_user_flags(id) & VIP)
{
if ( g_speed[id] )
{
new weapon;
weapon = read_data( 2 );
if ( weapon != g_event_weapon[ id ] )
{
set_pev( id, pev_maxspeed, float( 320 ) );
}
}
}
}
public remove_speed(id)
{
g_speed[id] = false;
set_pev( id, pev_maxspeed, float( 250 ) );
}
public matomas(id)
{
set_pev( id, pev_renderfx, kRenderFxNone );
set_pev( id, pev_rendercolor, { 0.0, 0.0, 0.0 } );
set_pev( id, pev_rendermode, kRenderTransTexture );
set_pev( id, pev_renderamt, 255.0 );
}
public handle_say(id)
{
static said[64]
read_args(said, charsmax(said))
if( ( contain(said, "/vips") != -1 ))
show_vip(id)
}
public show_vip(user)
{
new adminnames[32][33]
new message[256]
new id, count, x, len
new players[32], playersnum
get_players(players, playersnum, "ch")
for(--playersnum; playersnum >= 0; playersnum--)
{
id = players[playersnum]
if(get_user_flags(id) & VIP)
{
get_user_name(id, adminnames[count++], charsmax(adminnames[]))
}
}
len = formatex(message, charsmax(message), "^x01[^x03VIPS^x01]^x04 ", user)
if(count > 0)
{
for(x = 0 ; x < count ; x++)
{
len += formatex(message[len], charsmax(message)-len, "^1%s%s", adminnames[x], x < (count-1) ? ", ":".")
if(len > 96)
{
print_message(user, message)
//len = copy(message, charsmax(message))
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else
{
len += copy(message[len], charsmax(message)-len, "^x04Nera.")
print_message(user, message)
}
}
print_message(id, const msg[])
{
message_begin(MSG_ONE_UNRELIABLE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
Optimist78 prieš 9 metus
@Ernestas S Aj nu ;D Gi "HNS" :D... Aš and CS nelabai, tai :D Tik Public'uose sėdžiu dažniausiai ;D
Danielius prieš 9 metus
Nemanau, jog šiam modui tinka Gravity 5 sec, GODMODE 5 sec, Speed 10 sec, Nematomumas 10 sec. Nebent, kaip aš nežaidęs užsienietiškuose HNS MODOSE, tai nelabai žinau su tuo VM. Bet šiaip, kur esu lankesis, tai pagrindas būna HE, SG ir x2 FB. Tokių dalykų, kaip Gravity 5 sec nebūdavo.. :/
Hiwichi prieš 9 metus
Pamačiau šita koda ir pamaniau, kad visai įdomu būtu pasimokint cs pluginus kurt :D bet 1.6 jau atgyvena, manau geriau kažka su cs go geriau jau