Пользователь
- Сообщения
- 76
- Реакции
- 3
- Помог
- 1 раз(а)
Тут меню используется в виде секунд, как мне сделать чтобы отображалось в минутах??
Пример:
Код:
[ru]
MENU_VIP_1 = \yМеню VIPA ^n^n
TAKE_MONEY1 = \r2. \dВзять [%d] \R%d сек. ^n
TAKE_MONEY2 = \r2. \wВзять \y[\r%d$\y] - \y[\rГотово\y] ^n
TAKE_MONEY3 = \r2. \dВзять [\r%d$\d] ^n
TAKE_HPAP1 = \r3. \dВзять [255HP/AP] \R%d сек. ^n
TAKE_HPAP2 = \r3. \wВзять \y[\r255HP/AP\y] - \y[\rГотово\y] ^n
TAKE_HPAP3 = \r3. \dВзять [\r255HP/AP\d] ^n
TAKE_SpeedGrav1 = \r4. \dВзять [Speed/Grav] \R%d сек. ^n^n
TAKE_SpeedGrav2 = \r4. \wВзять \y[\rSpeed/Grav\y] - \y[\rГотово\y] ^n^n
TAKE_SpeedGrav3 = \r4. \dВзять [\rSpeed/Grav\d] ^n^n
BACK = \r8. \wНазад ^n
MENU_USIL_1 = \r1. \wМеню \yУсилиного оружия ^n
EXIT = \r0. \wВыход :) ^n^n \y Createt menu by: \wBitter
MENU_ZARABOT_1 = \wМеню заработает через \R%d сек. ^n^n
MENU_ZARABOT_2 = \dМеню заработает через \R%d сек. ^n^n
TAKES_MONEY = ^1[^4DOSTAUKR^1] Вы взяли деньги. ^4Удачной игры!
TAKES_HPAR = ^1[^4DOSTAUKR^1] Вы взяли 255HP/AP. ^4Удачной игры!
TAKES_SPEEDGRAV = ^1[^4DOSTAUKR^1] Вы взяли Speed/Grav. ^4Удачной игры!
WAITTS = ^1[^4DOSTAUKR^1] Подождите пока будет доступна ^4VIP Меню!
DOSTUP = ^1[^4DOSTAUKR^1] Доступно только для: ^4Вип игроков!
Код:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#define PLUGIN "VIP MENU"
#define VERSION "v 1.0"
#define AUTHOR "Bitter"
#define MAX_PLAYERS 32
#define VIP_DELAY_MONEY 15
#define VIP_DELAY_HP_AP 15
#define VIP_DELAY_Speed_Grav 15
#define VIP_DELAY_MENU 15
#define VIP_MONEYS 15000
#define VIP ADMIN_LEVEL_H
new MenuTime_HP_AP[MAX_PLAYERS + 1];
new MenuTime_Speed_Grav[MAX_PLAYERS + 1];
new VipMenuTime_HP_AP [MAX_PLAYERS + 1];
new VipMenuTime_Speed_Grav [MAX_PLAYERS + 1];
new MenuTimeMoney[MAX_PLAYERS + 1];
new VipMenuTimeMoney [MAX_PLAYERS + 1];
new VipMenuTime;
new bool:adminpeed[33] = false;
new keys_gun_vip = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_8|MENU_KEY_0
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_dictionary ("vip_menu.txt")
VipMenuTime = get_systime() + VIP_DELAY_MENU; //Время, после которого меню начнет работу (в сек.)
register_menu("menu_gun_vip", keys_gun_vip, "cmd_gun_vip")
register_clcmd("vip_menu", "GUNMENU")
register_clcmd("say /vip_menu", "GUNMENU")
RegisterHam(Ham_Killed, "player", "killnoob") /*Отлов смерти игрока*/
register_event("CurWeapon", "WeaponChange", "be", "1=1") /*Отлов смены оружки*/
}
public killnoob(id)
{
adminpeed[id] = false;
}
public WeaponChange(id)
{
if(adminpeed[id])
{
set_user_maxspeed(id, 400.0)
}
}
public GUNMENU(id)
{
if(get_user_flags(id) & VIP)
{
menu_vip(id);
}else{
client_print_color(id, 0, "%L", LANG_PLAYER,"DOSTUP");
}
return PLUGIN_HANDLED;
}
//Меню вип
public menu_vip(id)
{
new MenuTime = VipMenuTime - get_systime();
MenuTimeMoney[id] = VipMenuTimeMoney[id] - get_systime();
MenuTime_HP_AP[id] = VipMenuTime_HP_AP[id] - get_systime();
MenuTime_Speed_Grav[id] = VipMenuTime_Speed_Grav[id] - get_systime();
//Отображение
if ((MenuTime >= -1)) {
set_task (1.0 , "menu_vip", id);
} else remove_task(id);
//Отображение
static menu[650], iLen = 0;
iLen = formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"MENU_VIP_1");
if (is_user_admin(id) && VIP){
if (VipMenuTime > get_systime()){
iLen += formatex(menu[iLen], charsmax(menu), "%L", LANG_PLAYER,"MENU_ZARABOT_1", MenuTime);
}
} else iLen += formatex(menu[iLen], charsmax(menu), "%L", LANG_PLAYER,"MENU_ZARABOT_2", VIP_DELAY_MENU);
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"MENU_USIL_1")
if ((VipMenuTime < get_systime()) && (VIP)){
if(VipMenuTimeMoney[id] > get_systime()){
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_MONEY1", VIP_MONEYS,MenuTimeMoney[id]);
} else iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_MONEY2", VIP_MONEYS);
} else {
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_MONEY3", VIP_MONEYS, VIP_DELAY_MONEY);
}
if ((VipMenuTime < get_systime()) && (VIP)){
if(VipMenuTime_HP_AP[id] > get_systime()){
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_HPAP1",MenuTime_HP_AP[id]);
} else iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_HPAP2");
} else {
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_HPAP3", VIP_DELAY_HP_AP);
}
if ((VipMenuTime < get_systime()) && (VIP)){
if(VipMenuTime_Speed_Grav[id] > get_systime()){
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_SpeedGrav1",MenuTime_Speed_Grav[id]);
} else iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_SpeedGrav2");
} else {
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"TAKE_SpeedGrav3", VIP_DELAY_Speed_Grav);
}
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"BACK")
iLen += formatex(menu[iLen], charsmax(menu) - iLen, "%L", LANG_PLAYER,"EXIT")
return show_menu(id, keys_gun_vip, menu, -1, "menu_gun_vip")
}
public cmd_gun_vip(id, key)
{
remove_task(id)
switch(key)
{
case 0: client_cmd(id, "menu_orujiyas")
case 1:
{
if(get_user_flags(id) & VIP)
{
if (VipMenuTime < get_systime())
{
if (VipMenuTimeMoney[id] > get_systime())
{
menu_vip(id)
return PLUGIN_HANDLED;
}
client_print_color(id, 0, "%L", LANG_PLAYER,"TAKES_MONEY");
cs_set_user_money(id, cs_get_user_money(id) + VIP_MONEYS);
VipMenuTimeMoney[id] = get_systime(VIP_DELAY_MONEY);
menu_vip(id)
} else {
client_print_color(id, 0, "%L", LANG_PLAYER,"WAITTS");
menu_vip(id)
}
} else {
client_print_color(id, 0, "%L", LANG_PLAYER,"DOSTUP");
menu_vip(id);
}
}
case 2:
{
if(get_user_flags(id) & VIP)
{
if (VipMenuTime < get_systime())
{
if (VipMenuTime_HP_AP[id] > get_systime())
{
menu_vip(id)
return PLUGIN_HANDLED;
}
client_print_color(id, 0, "%L", LANG_PLAYER,"TAKES_HPAR");
new health[32]
health[id] = get_user_health(id)
set_user_health(id,health[id] + 255)
new armor[32]
armor[id] = get_user_armor(id)
set_user_armor(id,armor[id] + 255)
VipMenuTime_HP_AP[id] = get_systime(VIP_DELAY_HP_AP);
menu_vip(id)
} else {
client_print_color(id, 0, "%L", LANG_PLAYER,"WAITTS");
menu_vip(id)
}
} else {
client_print_color(id, 0, "%L", LANG_PLAYER,"DOSTUP");
menu_vip(id);
}
}
case 3:
{
if(get_user_flags(id) & VIP)
{
if (VipMenuTime < get_systime())
{
if (VipMenuTime_Speed_Grav[id] > get_systime())
{
menu_vip(id)
return PLUGIN_HANDLED;
}
client_print_color(id, 0, "%L", LANG_PLAYER,"TAKES_SPEEDGRAV");
client_cmd(id,"cl_forwardspeed 400")
client_cmd(id,"cl_backspeed 400")
client_cmd(id,"cl_sidespeed 400")
adminpeed[id] = true;
set_user_gravity(id, 0.5)
VipMenuTime_Speed_Grav[id] = get_systime(VIP_DELAY_Speed_Grav);
menu_vip(id)
} else {
client_print_color(id, 0, "%L", LANG_PLAYER,"WAITTS");
menu_vip(id)
}
} else {
client_print_color(id, 0, "%L", LANG_PLAYER,"DOSTUP");
menu_vip(id);
}
}
case 7:
{
console_print(id, "* SKORO")
menu_vip(id);
}
}
return PLUGIN_HANDLED
}
//конец вип меню
Пример:
Вложения
-
24.9 KB Просмотры: 24
Последнее редактирование: