Hello i found a VIPMENU what is not to find here in Forum. SO i will post it only. Its in Bosnia Language. Found it in Gametracker.rs Forum. So when anyone have fun to translate it and post it in englisch, it will be good. When the Post dont ok then it can remove by a Mod.
For the Models u have to use own models .
Code:
///////////////////////// VIP SHOP ///////////////////////
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <fakemeta>
#include <hamsandwich>
#include <engine>
#define PLUGIN "VipShop"
#define VERSION "1.0"
#define AUTHOR "DecaK"
#define PLUGIN_NAME "Teleport Smoke Grenade"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"
#define SMOKE_SCALE 30
#define SMOKE_FRAMERATE 12
#define SMOKE_GROUND_OFFSET 6
new const g_sound_explosion[] = "weapons/sg_explode.wav"
new const g_classname_grenade[] = "grenade"
new const Float:g_sign[4][2] = {{1.0, 1.0}, {1.0, -1.0}, {-1.0, -1.0}, {-1.0, 1.0}}
new g_spriteid_steam1
new g_eventid_createsmoke
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipshop","VipShop")
register_clcmd("say_team /vipshop", "VipShop")
register_forward(FM_EmitSound, "forward_emitsound")
register_forward(FM_PlaybackEvent, "forward_playbackevent")
g_spriteid_steam1 = engfunc(EngFunc_PrecacheModel, "sprites/steam1.spr")
g_eventid_createsmoke = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
public VipShop(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
ColorChat(id, TEAM_COLOR, "^4[^3VipShop^4] ^1Nemas pristup!")
return PLUGIN_HANDLED
}
else
{
{
new menu = menu_create("[VipShop] Izaberi Item:", "VipShopHandle")
// plugin pravi novi menu koji se zove "[VipShop] Izaberi Item
menu_additem(menu, "Respawn CT | 5500$")
menu_additem(menu, "Respawn T | 5500$")
menu_additem(menu, "M4A1 sa 1 metkom | 14000$")
menu_additem(menu, "Teleport Bomba | 3000$")
menu_additem(menu, "Red Glow | 1000")
menu_display(id, menu)
}
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public VipShopHandle(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_CONTINUE
}
switch(item)
{
case 0:
{
new money = cs_get_user_money(id)
if(money < 5500)
{
ColorChat(id, TEAM_COLOR, "^4[^3VipShop^4]^3 Nemas dovoljno novca za kupovinu ^4CT Respawna^3!")
return PLUGIN_HANDLED
}
else
{
cs_set_user_team(id, CS_TEAM_CT);
ExecuteHamB(Ham_CS_RoundRespawn, id);
give_item (id, "weapon_knife");
cs_set_user_team(id, CS_TEAM_CT);
cs_set_user_money(id, money - 5500)
}
return PLUGIN_HANDLED
}
case 1: // slucaj 2
{
new money = cs_get_user_money(id)
if(money < 5500)
{
ColorChat(id, TEAM_COLOR, "^4[^3VipShop^4]^3 Nemas dovoljno novca za kupovinu ^4T Respawna^3!")
return PLUGIN_HANDLED
}
else // ostalo (ako ima vise ili jednako 500)
{
cs_set_user_team(id, CS_TEAM_T);
ExecuteHamB(Ham_CS_RoundRespawn, id);
give_item(id, "weapon_knife");
cs_set_user_money(id, money - 5500)
cs_set_user_team(id, CS_TEAM_T);
}
return PLUGIN_HANDLED
}
case 2:
{
new money = cs_get_user_money(id)
if(money < 14000)
{
ColorChat(id, TEAM_COLOR, "^4[^3VipShop^4]^3 Nemas dovoljno novca za kupovinu ^4M4A1 sa 2 metka^3!")
return PLUGIN_HANDLED
}
else
{
give_item(id, "weapon_m4a1");
cs_set_weapon_ammo(find_ent_by_owner(-1, "weapon_m4a1", id), 1)
cs_set_user_bpammo( id, CSW_M4A1, 1 );
cs_set_user_money(id, money - 14000)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
case 3:
{
new money = cs_get_user_money(id)
if(money < 3000)
{
ColorChat(id, TEAM_COLOR, "^4[^3VipShop^4]^3 Nemas dovoljno novca za kupovinu ^4Teleport Bombe^3!")
return PLUGIN_HANDLED
}
else
{
give_item(id, "weapon_smokegrenade");
ColorChat(id, TEAM_COLOR, "^4[VipShop]^1 Kupio si ^3Teleport Bombu^1!")
cs_set_user_money(id, money - 1000)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
case 4:
{
new money = cs_get_user_money(id)
if(money < 1000)
{
ColorChat(id, TEAM_COLOR, "^4[^3VipShop^4]^3 Nemas dovoljno novca za kupovinu ^4Red Glow^3!")
return PLUGIN_HANDLED
}
else
{
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
ColorChat(id, TEAM_COLOR, "^4[VipShop]^1 Kupio si ^3Red Glow ^1!")
cs_set_user_money(id, money - 1000)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
}
return PLUGIN_HANDLED
}
public forward_emitsound(ent, channel, const sound[]) {
if (!equal(sound, g_sound_explosion) || !is_grenade(ent))
return FMRES_IGNORED
static id, Float:origin[3]
id = pev(ent, pev_owner)
pev(ent, pev_origin, origin)
engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, g_sound_explosion, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
engfunc(EngFunc_SetOrigin, ent, Float:{8191.0, 8191.0, 8191.0})
origin[2] += SMOKE_GROUND_OFFSET
create_smoke(origin)
if (is_user_alive(id)) {
static Float:mins[3], hull
pev(id, pev_mins, mins)
origin[2] -= mins[2] + SMOKE_GROUND_OFFSET
hull = pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
if (is_hull_vacant(origin, hull))
engfunc(EngFunc_SetOrigin, id, origin)
else { // close to a solid object, trying to find a vacant spot
static Float:vec[3]
vec[2] = origin[2]
for (new i; i < sizeof g_sign; ++i) {
vec[0] = origin[0] - mins[0] * g_sign[i][0]
vec[1] = origin[1] - mins[1] * g_sign[i][1]
if (is_hull_vacant(vec, hull)) {
engfunc(EngFunc_SetOrigin, id, vec)
break
}
}
}
}
return FMRES_SUPERCEDE
}
public forward_playbackevent(flags, invoker, eventindex) {
// we do not need a large amount of smoke
if (eventindex == g_eventid_createsmoke)
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
bool:is_grenade(ent) {
if (!pev_valid(ent))
return false
static classname[sizeof g_classname_grenade + 1]
pev(ent, pev_classname, classname, sizeof g_classname_grenade)
if (equal(classname, g_classname_grenade))
return true
return false
}
create_smoke(const Float:origin[3]) {
// engfunc because origin are float
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_SMOKE)
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
write_short(g_spriteid_steam1)
write_byte(SMOKE_SCALE)
write_byte(SMOKE_FRAMERATE)
message_end()
}
stock bool:is_hull_vacant(const Float:origin[3], hull) {
new tr = 0
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, tr)
if (!get_tr2(tr, TR_StartSolid) && !get_tr2(tr, TR_AllSolid) && get_tr2(tr, TR_InOpen))
return true
return false
}
//////////////////////////////////// Power KNIFE VIP Menu /////////////////////////////////////////////////
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>
#include <fun>
#define ACCESS_FLAG ADMIN_LEVEL_H
#define TASK_DELAY 0.5
#define TASK_MODEL 100
#define MODEL_PLAYER "pkvip"
#define VIP_CHECK ADMIN_LEVEL_H
#define ADMINACCESS ADMIN_LEVEL_H
new const VERSION[] = "1.0"
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new pcvar_on
new maxplayers
new gmsgSayText
new pcvar_obavestenje
new jumpnum[33] = 0
new bool:dojump[33] = false
new noz_igraca[33] = 0;
new g_has_custom_model[33],g_player_model[33][32],Float:g_models_counter
new const g_szUltra[ ] = "models/pkvip/v_ultra.mdl";
new const g_szSuper[ ] = "models/pkvip/v_super.mdl";
new const g_szZoom[ ] = "models/pkvip/v_zoom.mdl";
new const g_szNormal[ ] = "models/pkvip/v_normal.mdl";
new bool:ima_noz1[33]
new bool:ima_noz2[33]
new bool:ima_noz3[33]
new bool:ima_noz4[33]
public plugin_init()
{
register_plugin("Ultimate Knife VIP", VERSION, "PrInCe & DecaK")
pcvar_on = register_cvar("model_on","1")
if(get_pcvar_num(pcvar_on))
{
register_logevent("event_round_end", 2, "1=Round_End")
register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
RegisterHam(Ham_Spawn,"player","func_spawn",1)
RegisterHam(Ham_Spawn,"player","Spawn",2)
register_clcmd("say", "sayee")
register_clcmd("say", "handle_say")
register_concmd("say /kmenu","proveri")
register_concmd("say /knifemenu","proveri")
register_concmd("say /vipinfo","vipinformacije")
register_concmd("say /vipknife","proveri")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")
register_cvar("amx_maxjumps","1")
register_cvar("amx_mjadminonly","1")
register_forward(FM_SetClientKeyValue, "fw_key_value")
register_forward(FM_ClientUserInfoChanged, "fw_user_info_changed")
maxplayers = get_maxplayers()
pcvar_obavestenje = register_cvar("obavestenje", "60")
set_task(get_pcvar_float(pcvar_obavestenje),"obavestenje" , _ , _ , _ , "b")
}
}
public plugin_precache()
{
new path[100]
formatex(path,sizeof path - 1,"models/pkvip/%s.mdl",MODEL_PLAYER)
engfunc(EngFunc_PrecacheModel,path)
precache_model( g_szUltra );
precache_model( g_szSuper );
precache_model( g_szZoom );
precache_model( g_szNormal );
}
public func_spawn(id)
{
if(is_user_alive(id))
{
if(get_user_flags(id) & ACCESS_FLAG)
{
copy(g_player_model[id], sizeof g_player_model[] - 1, MODEL_PLAYER)
new currentmodel[32]
fm_get_user_model(id, currentmodel, sizeof currentmodel - 1)
if (!equal(currentmodel, g_player_model[id]))
{
set_task(1.0 + g_models_counter, "task_set_model", id+TASK_MODEL)
g_models_counter += TASK_DELAY
}
}else if (g_has_custom_model[id])
{
fm_reset_user_model(id)
}
}
}
public client_disconnect(id)
{
noz_igraca[id] = 0;
ima_noz1[id] = false
ima_noz2[id] = false
ima_noz3[id] = false
ima_noz4[id] = false
jumpnum[id] = 0
dojump[id] = false
}
public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public event_round_end()
{
g_models_counter = 0.0
}
public fw_key_value(id, const infobuffer[], const key[])
{
if (g_has_custom_model[id] && equal(key, "model"))
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
public fw_ClientUserInfoChanged(id)
{
if (!g_has_custom_model[id])
return FMRES_IGNORED
static currentmodel[32]
fm_get_user_model(id, currentmodel, sizeof currentmodel - 1)
if (!equal(currentmodel, g_player_model[id]))
fm_set_user_model(id, g_player_model[id])
return FMRES_IGNORED
}
public task_set_model(id)
{
id -= TASK_MODEL
fm_set_user_model(id, g_player_model[id])
}
stock fm_set_user_model(player, const modelname[])
{
engfunc(EngFunc_SetClientKeyValue, player, engfunc(EngFunc_GetInfoKeyBuffer, player), "model", modelname)
g_has_custom_model[player] = true
}
stock fm_get_user_model(player, model[], len)
{
engfunc(EngFunc_InfoKeyValue, engfunc(EngFunc_GetInfoKeyBuffer, player), "model", model, len)
}
stock fm_reset_user_model(player)
{
g_has_custom_model[player] = false
dllfunc(DLLFunc_ClientUserInfoChanged, player, engfunc(EngFunc_GetInfoKeyBuffer, player))
}
public sayee(id){
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new said[192], name[30]
get_user_name(id,name,29)
read_args(said,191)
remove_quotes(said)
ColorChat(0, GREEN,"[V.I.P] ^3%s ^1: %s",name,said)
}
}
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "vip") != -1 ) || contain(said, "/vips") != -1 )
set_task(0.1,"print_adminlist",id)
return PLUGIN_CONTINUE
}
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) & VIP_CHECK)
get_user_name(id, adminnames[count++], 31)
len = format(message, 255, "%s ONLINE VIP-ovi su: ",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, "Nema online VIP-ova")
print_message(user, message)
}
get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Vip -- %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()
}
public proveri(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
meni(id);
}
else
{
ColorChat(id, TEAM_COLOR, "^4[VIP]^3 Nemas dozvolu da koristis vipa! Vip se mora kupiti!")
}
}
public meni(id)
{
new menu= menu_create("\yVIP Knife Menu \r- \yIzaberi","menu_handler")
menu_additem(menu,"\wUltra Knife \r[\yGravitacija\r]")
menu_additem(menu,"\wSuper Knife \r[\yBrzina\r]")
menu_additem(menu,"\wHealth Knife \r[\yVise Helta]")
menu_additem(menu,"\wNormal Knife \r[\yLep Skin\r]")
menu_display(id,menu);
}
public menu_handler(id,menu,item)
{
if(item==MENU_EXIT)
{
menu_destroy(menu);
ColorChat(id, TEAM_COLOR, "^4[VIP]^3 Zatvaram Knife Meni.^1")
return PLUGIN_CONTINUE;
}
switch(item)
{
case 0:
{
noz_igraca[id] = 1;
ColorChat(id, TEAM_COLOR, "^4[VIP]^3 Izabrao si Ultra Knife, noz ce biti aktiviran na sledecem respawnu.^1")
}
case 1:
{
noz_igraca[id] = 2;
ColorChat(id, TEAM_COLOR, "^4[VIP]^3 Izabrao si Super Knife, noz ce biti aktiviran na sledecem respawnu.^1")
}
case 2:
{
noz_igraca[id] = 3;
ColorChat(id, TEAM_COLOR, "^4[VIP]^3 Izabrao si Zoom Knife, noz ce biti aktiviran na sledecem respawnu.^1")
}
case 3:
{
noz_igraca[id] = 4;
ColorChat(id, TEAM_COLOR, "^4[VIP]^3 Izabrao si Normal Knife, noz ce biti aktiviran na sledecem respawnu.^1")
}
}
return PLUGIN_CONTINUE
}
public Spawn(id)
{
if(!is_user_connected(id) || !is_user_alive(id) || get_user_flags(id) & ADMIN_LEVEL_H)
switch(noz_igraca[id])
{
case 1:
{
set_task(1.0, "stavigravity", id);
ima_noz1[id] = true
ima_noz2[id] = false
ima_noz3[id] = false
ima_noz4[id] = false
set_pev(id, pev_viewmodel2, g_szUltra );
}
case 2:
{
set_task(1.0, "stavispeed", id);
ima_noz2[id] = true
ima_noz1[id] = false
ima_noz3[id] = false
ima_noz4[id] = false
set_pev(id, pev_viewmodel2, g_szSuper );
}
case 3:
{
set_task(2.0, "stavihelte", id);
ima_noz3[id] = true
ima_noz1[id] = false
ima_noz2[id] = false
ima_noz4[id] = false
set_pev(id, pev_viewmodel2, g_szZoom );
}
case 4:
{
ima_noz4[id] = true
ima_noz1[id] = false
ima_noz2[id] = false
ima_noz3[id] = false
set_pev(id, pev_viewmodel2, g_szNormal);
}
}
}
public stavigravity(id)
{
set_user_gravity(id, 0.4)
}
public stavispeed(id)
{
set_user_maxspeed(id , get_user_maxspeed(id) + 300.0)
}
public stavihelte(id)
{
set_user_health(id, 80)
}
public event_CurWeapon(id)
{
static weapon
weapon = read_data(2)
switch(weapon)
{
case CSW_KNIFE:
{
if(ima_noz1[id] == true)
{
{
set_pev(id, pev_viewmodel2, g_szUltra );
}
}
else if(ima_noz2[id] == true)
{
{
set_pev(id, pev_viewmodel2, g_szSuper );
set_user_maxspeed(id , get_user_maxspeed(id) + 300.0)
}
}
else if(ima_noz3[id] == true)
{
{
set_pev(id, pev_viewmodel2, g_szZoom );
}
}
else if(ima_noz4[id] == true)
{
{
set_pev(id, pev_viewmodel2, g_szNormal );
}
}
}
}
}
public vipinformacije(id)
{
static motd[1501], len
len = format(motd, 1500,"<body bgcolor=#000000><font color=#87cefa><pre>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"red^"><B>Ultimate Knife VIP sadrzi sledece:</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"blue^"><B>-----------------------</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"white^"><B>-Knife Menu</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"white^"><B>-VIP Shop</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"white^"><B>-MultiJump</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"green^"><B>-Prefix [VIP]</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"blue^"><B>-----------------------</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"red^"><B>Za kupovinu se javite vlasniku.</B> </font></h4></center>")
len += format(motd[len], 1500-len,"<center><h4><font color=^"blue^"><B>-----------------------</B> </font></h4></center>")
show_motd(id, motd, "PKV by: PrInCe & DecaK")
return 0
}
public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < get_cvar_num("amx_maxjumps"))
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(get_cvar_num("amx_mjadminonly") && (!access(id,ADMINACCESS))) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public obavestenje()
{
ColorChat(0, TEAM_COLOR, "^4[VIP]^3 Ovaj server koristi Ultimate Knife VIP by: ^4PrInCe & DecaK^1")
ColorChat(0, TEAM_COLOR, "^4[VIP]^3 Da pogledas informacije o vip-u, say: /vipinfo.^1")
ColorChat(0, TEAM_COLOR, "^4[VIP]^3 Da otvoris knife menu, say: /kmenu ili /knifemenu.^1")
}