Abi vaja vipmenuga
Lehekülg 1, lehekülgi kokku 1 • Share
- Tehnik aKKomeet
- Liitus : 28/03/2013
Postitusi : 453
Tere, kas keegi oskaks mu vipmenu korda teha?
- Koke#6
- Liitus : 30/04/2014
Postitusi : 1306
Kus script on?
- Tehnik aKKomeet
- Liitus : 28/03/2013
Postitusi : 453
Et tavamängijad saaksid ka menüüd avada.
Aga hetkel ei avane see ültse ma ei saa aru mis toimub??
Aga hetkel ei avane see ültse ma ei saa aru mis toimub??
- Kood:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define VIP_FLAG ADMIN_LEVEL_B
#if AMXX_VERSION_NUM <= 182
#define MAX_PLAYERS 33
#endif
new bool:g_bExtraDamage[MAX_PLAYERS];
new g_hMenu;
public plugin_init(){
register_plugin("Simple VIP Menu","v1.0","Hyuna");
register_clcmd("say /vmenu","cmdVipMenu");
register_event("HLTV","evtNewRound","a","1=0","2=0");
RegisterHam(Ham_TakeDamage,"player","fw_HamTakeDamagePre",0);
}
public plugin_cfg(){
g_hMenu = menu_create("VIPMenüü","mHandler");
menu_additem(g_hMenu,"Vaikne kõndimine");
menu_additem(g_hMenu,"Rohkem damage");
menu_additem(g_hMenu,"+16000$");
menu_additem(g_hMenu,"+50HP");
menu_additem(g_hMenu,"+50AP");
}
public fw_HamTakeDamagePre(idvictim,idinflictor,idattacker,Float:damage,damagebits){
if (is_user_alive(idattacker))
{
if (g_bExtraDamage[idattacker])
SetHamParamFloat(4,damage * 5.5);
}
}
public evtNewRound(){
arrayset(g_bExtraDamage,false,MAX_PLAYERS);
}
public cmdVipMenu(client){
if (!(get_user_flags(client) & VIP_FLAG))
{
client_print(client,print_chat,"[AMXX] Ainult VIPid saavad seda menüüd kasutada!");
return PLUGIN_HANDLED;
}
menu_display(client,g_hMenu);
return PLUGIN_HANDLED;
}
public mHandler(client,menu,item){
static CsArmorType:temp;
if (!is_user_alive(client))
return PLUGIN_HANDLED;
switch(item)
{
case 0: set_user_footsteps(client,1);
case 1: g_bExtraDamage[client] = true;
case 2: cs_set_user_money(client,min((cs_get_user_money(client) + 16000),16000),1);
case 3: set_user_health(client,min((get_user_health(client) + 50),100));
case 4: cs_set_user_armor(client,min((cs_get_user_armor(client,temp) + 50),100),CS_ARMOR_VESTHELM);
}
return PLUGIN_HANDLED;
}
- AnbuJuunior
- Liitus : 16/05/2015
Postitusi : 38
haha
Soovid vestluses osaleda?
Selleks logi sisse või tee endale kasutaja.
Lehekülg 1, lehekülgi kokku 1
Permissions in this forum:
Sa ei saa vastata siinsetele teemadele