3Be3Da
Пользователь
- Регистрация
- 14 Авг 2017
- Сообщения
- 131
- Симпатии
- 3
- Предупреждения
- 30
- Пол
- Мужской
Неверный раздел! Внимательнее выбирайте подходящий раздел для ваших тем!
- Ошибка
-
Код:C++:
Error: Initialization data exceeds declared size on line 33
вот код
[DOUBLEPOST=1525268162][/DOUBLEPOST]Ошибку исправил но теперь сервер не запускается
код
Код:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN "plugins"
#define VERSION "1.0"
#define AUTHOR "3Be3Da"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipmenu", "vipmenu1")
register_clcmd("say .мшзьутг", "vipmenu1")
register_clcmd("vipmenu", "vipmenu1")
RegisterHam(Ham_Item_Deploy, "weapon_knife", "Item_Deploy_Post", true)
RegisterHam(Ham_Spawn, "player", "player_respawn", 1)
}
new const modelki[33] =
{
"models/vipmenu/ak47orgiya.mdl",
"models/vipmenu/deagleorgiya.mdl",
"models/vipmenu/m4a1orgiya.mdl",
"models/vipmenu/knifeorgiya.mdl",
"models/vipmenu/awporgiya.mdl",
}
public plugin_precache()
{
precache_model(modelki)
}
public player_respawn(id)
{
if(is_user_connected(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
set_pev(id, pev_viewmodel2, modelki)
}
if(is_user_alive(id) && is_user_connected(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 150)
}
}
public vipmenu1(id)
{
new vipmenu = menu_create("\rВип меню", "vipmenuhandler")
if(is_user_alive(id), get_user_flags(id) & ADMIN_LEVEL_H)
{
menu_additem(vipmenu, "\rВозродится", "1")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "Взять \rак-47", "2")
menu_additem(vipmenu, "Взять \rм4а1", "3")
menu_additem(vipmenu, "Взять \rAWP", "4")
menu_additem(vipmenu, "Взять \rФамас", "5")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "Взять \yневидемость", "6")
menu_additem(vipmenu, "Взять \yскорость", "7")
menu_setprop(vipmenu, MPROP_EXITNAME)
menu_display(id, vipmenu, 0)
return PLUGIN_HANDLED;
}
else if(!is_user_alive(id))
{
menu_additem(vipmenu, "\rВозродится", "1")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "\dВзять ак-47", "2")
menu_additem(vipmenu, "\dВзять \dм4а1", "3")
menu_additem(vipmenu, "\dВзять \dAWP", "4")
menu_additem(vipmenu, "\dВзять \dФамас", "5")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "\dВзять невидемость", "6")
menu_additem(vipmenu, "\dВзять скорость", "7")
menu_setprop(vipmenu, MPROP_EXITNAME)
menu_display(id, vipmenu, 0)
}
return PLUGIN_HANDLED;
}
public vipmenuhandler(id, item, vipmenu)
{
if(item == MENU_EXIT)
{
menu_destroy(vipmenu)
return PLUGIN_HANDLED;
}
new data[6], name[64], access, callback
menu_item_getinfo(vipmenu, item, access, data, 6, name, 64, callback)
new key = str_to_num(data)
switch(key)
{
case 1:
{
if(!is_user_alive(id))
{
ExecuteHamB(Ham_CS_RoundRespawn, id);
ColorChat(id, NORMAL, "[^4ViP^1] - вы ^3возродились!")
}
else if(is_user_alive(id))
{
ColorChat(id, NORMAL, "[ViP] - Вы должны умереть!")
}
}
case 2:
{
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id, CSW_AK47, 150)
}
case 3:
{
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 150)
}
case 4:
{
give_item(id, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 90)
}
case 5:
{
give_item(id, "weapon_famas")
cs_set_user_bpammo(id, CSW_FAMAS, 150)
}
case 6:
{
if(is_user_alive(id))
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAdd, 50)
}
}
case 7:
{
if(is_user_alive(id))
{
set_user_maxspeed(id, 300.0)
}
}
}
return PLUGIN_HANDLED;
}
код
Код:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN "plugins"
#define VERSION "1.0"
#define AUTHOR "3Be3Da"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vipmenu", "vipmenu1")
register_clcmd("say .мшзьутг", "vipmenu1")
register_clcmd("vipmenu", "vipmenu1")
RegisterHam(Ham_Item_Deploy, "weapon_knife", "Item_Deploy_Post", true)
RegisterHam(Ham_Spawn, "player", "player_respawn", 1)
}
new const modelki[] =
{
"models/vipmenu/ak47orgiya.mdl",
"models/vipmenu/deagleorgiya.mdl",
"models/vipmenu/m4a1orgiya.mdl",
"models/vipmenu/knifeorgiya.mdl",
"models/vipmenu/awporgiya.mdl",
}
public plugin_precache()
{
precache_model(modelki)
}
public player_respawn(id)
{
if(is_user_connected(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
set_pev(id, pev_viewmodel2, modelki)
}
if(is_user_alive(id) && is_user_connected(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 150)
}
}
public vipmenu1(id)
{
new vipmenu = menu_create("\rВип меню", "vipmenuhandler")
if(is_user_alive(id), get_user_flags(id) & ADMIN_LEVEL_H)
{
menu_additem(vipmenu, "\rВозродится", "1")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "Взять \rак-47", "2")
menu_additem(vipmenu, "Взять \rм4а1", "3")
menu_additem(vipmenu, "Взять \rAWP", "4")
menu_additem(vipmenu, "Взять \rФамас", "5")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "Взять \yневидемость", "6")
menu_additem(vipmenu, "Взять \yскорость", "7")
menu_setprop(vipmenu, MPROP_EXITNAME)
menu_display(id, vipmenu, 0)
return PLUGIN_HANDLED;
}
else if(!is_user_alive(id))
{
menu_additem(vipmenu, "\rВозродится", "1")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "\dВзять ак-47", "2")
menu_additem(vipmenu, "\dВзять \dм4а1", "3")
menu_additem(vipmenu, "\dВзять \dAWP", "4")
menu_additem(vipmenu, "\dВзять \dФамас", "5")
menu_addblank(vipmenu, 0)
menu_additem(vipmenu, "\dВзять невидемость", "6")
menu_additem(vipmenu, "\dВзять скорость", "7")
menu_setprop(vipmenu, MPROP_EXITNAME)
menu_display(id, vipmenu, 0)
}
return PLUGIN_HANDLED;
}
public vipmenuhandler(id, item, vipmenu)
{
if(item == MENU_EXIT)
{
menu_destroy(vipmenu)
return PLUGIN_HANDLED;
}
new data[6], name[64], access, callback
menu_item_getinfo(vipmenu, item, access, data, 6, name, 64, callback)
new key = str_to_num(data)
switch(key)
{
case 1:
{
if(!is_user_alive(id))
{
ExecuteHamB(Ham_CS_RoundRespawn, id);
ColorChat(id, NORMAL, "[^4ViP^1] - вы ^3возродились!")
}
else if(is_user_alive(id))
{
ColorChat(id, NORMAL, "[ViP] - Вы должны умереть!")
}
}
case 2:
{
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id, CSW_AK47, 150)
}
case 3:
{
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 150)
}
case 4:
{
give_item(id, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 90)
}
case 5:
{
give_item(id, "weapon_famas")
cs_set_user_bpammo(id, CSW_FAMAS, 150)
}
case 6:
{
if(is_user_alive(id))
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAdd, 50)
}
}
case 7:
{
if(is_user_alive(id))
{
set_user_maxspeed(id, 300.0)
}
}
}
return PLUGIN_HANDLED;
}
Последнее редактирование модератором: