Re: Can somebody help for footsteps and invisible
Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <cstrike>
static const COLOR[] = "^x04"
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
new bool:FirstSpawn[33]
public plugin_init()
{
register_plugin("VIP", "1.0", "edgaras85")
register_clcmd("say /wantvip","ShowMotd")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam (Ham_Spawn, "player", "Player_Spawn", 1)
register_forward( FM_PlayerPreThink, "forward_player_prethink" );
register_logevent( "logevent_round_start", 2, "1=Round_Start" );
return PLUGIN_CONTINUE
}
public Player_Spawn(id)
{
if( !is_user_alive(id) )
{
FirstSpawn[id] = true
return
}
FirstSpawn[id] = false
new menu = menu_create("VIP MENU:", "vip_menu");
menu_additem(menu, "350 hp", "1", ADMIN_LEVEL_H);
menu_additem(menu, "Gravitacija", "2", ADMIN_LEVEL_H);
menu_additem(menu, "+4000$", "3", ADMIN_LEVEL_H);
menu_additem(menu ,"Tylus ejimas", "4" , ADMIN_LEVEL_H);
menu_additem(menu ,"Greitas Begimas", "5" , ADMIN_LEVEL_H);
menu_additem(menu ,"+200 Armoro", "6" , ADMIN_LEVEL_H);
menu_additem(menu ,"Granatos", "7" , ADMIN_LEVEL_H);
menu_additem(menu ,"Nematomumas", "8" , ADMIN_LEVEL_H);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
public vip_menu(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
strip_user_weapons (id)
fm_set_user_health( id, 350 );
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "Tu pasiemiai 350 hp");
menu_destroy(menu);
return PLUGIN_HANDLED;
}
case 2:
{
strip_user_weapons (id)
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
set_user_gravity ( id, 0.75 );
client_print(id, print_center , "Tu pasiemiai Gravitacija");
}
case 3:
{
cs_set_user_money(id, cs_get_user_money(id) + 4000);
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "Gavai + 4000 pinigu");
}
case 4:
{
set_user_footstep( id, "1" );
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "Pamirsk SHIFT mygtuka");
}
case 5:
{
new Float:speed = get_user_maxspeed(id) + 100.0;
set_user_maxspeed(id , speed);
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "Begsi greiciau");
}
case 6:
{
fm_set_user_armor( id, get_user_armor( id ) + 200 );
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "+200 armoro");
}
case 7:
{
fm_give_item( id, "weapon_knife" );
fm_give_item ( id, "weapon_hegrenade" );
fm_give_item ( id, "weapon_flashbang" );
fm_give_item ( id, "weapon_smokegrenade" );
fm_give_item ( id, "weapon_flashbang" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "Tu Pasiemiai Visas Granatas");
}
case 8:
{
fm_set_rendering( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 80 );
fm_give_item( id, "weapon_knife" );
fm_give_item( id, "weapon_usp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
fm_give_item( id, "ammo_45acp" );
client_print(id, print_center , "Nematomumas");
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public client_authorized(id)
{
set_task(30.0, "PrintText" ,id)
}
public PrintText(id)
{
client_print(id, print_chat, "[VIP] write /wantvip and u will see how get VIP and VIP privilegies.")
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
public client_connect(id)
{
new name[32]
get_user_info(id, "name", name, 31)
if(get_user_flags(id) & ADMIN_LEVEL_H)
set_hudmessage(200,0,0, 0.03, 0.62, 2, 0.02, 5.0, 0.01, 0.1, 1);
show_hudmessage(0, "Specialus zaidejas %s atejo pazaisti",name)
}
public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len
for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_LEVEL_H)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s VIP ONLINE: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "No VIP online.")
print_message(user, message)
}
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}
print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
|