new_vip.sma(1) : error 010: invalid function or declaration
new_vip.sma(20) : warning 217: loose indentation
new_vip.sma(22) : warning 217: loose indentation
new_vip.sma(39) : warning 217: loose indentation
new_vip.sma(51) : warning 217: loose indentation
new_vip.sma(56) : warning 217: loose indentation
new_vip.sma(61) : warning 217: loose indentation
new_vip.sma(83) : warning 209: function "giveWeapon" should return a value
1 Error.
Could not locate output file new_vip.amx (compile failed).
Вот Проблема хз чё за хДобавлено (2013-02-13, 14:10)
---------------------------------------------
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define VIP_FLAG ADMIN_LEVEL_H
new a
new round_number
public plugin_init()
{
register_plugin("VIP Privileges", "1.1", "Kent-4");
register_event("ResetHUD", "ResetHUD", "be");
register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
register_clcmd("say /adminka", "adminka");
register_clcmd("say /vip","ShowMotd");
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4
register_menucmd(register_menuid("Which Weapon?"), keys, "giveWeapon");
register_clcmd("say /vipmenu", "showWeaponMenu");
}
public client_putinserver(id)
{
set_task(0.5, "vip_connect", id);
}
public vip_connect(id)
if (get_user_flags(id)&VIP_FLAG)
{
new name[32];
get_user_name(id, name, 31);
ChatColor(0, "К нам присоединился !g[VIP] игрок !g%s", name)
}
public showWeaponMenu(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4
format(menu, 191, "Which Weapon?^n^n1. AK47^n2. M4A1^n3. AWP^n4. DEAGLE")
show_menu(id, keys, menu)
return PLUGIN_HANDLED
}
public giveWeapon(id, key)
{
if ( ! ( get_user_flags ( id ) & VIP_FLAG ) )
{
ChatColor ( id , "!g[SERVER]!y ТОЛЬКО ДЛЯ !team[VIP] !y!" );
return PLUGIN_HANDLED;
}
if ( ! is_user_alive ( id ) )
{
ChatColor(id, "!g[SERVER]!y You!team [Dead] !y!");
return PLUGIN_HANDLED;
}
if (a > 1 )
{
ChatColor(id, "!g[SERVER]!y НЕЛЬЗЯ ВЗЯТЬ!team [БОЛЬШЕ] !y!");
return PLUGIN_HANDLED;
}
if ( round_number <= 3 )
{
ChatColor ( id , "!g[SERVER]!y Доступно со 2 раунда !y!" );
return PLUGIN_HANDLED;
}
if (key == 0)
{
give_item(id, "weapon_ak47")
cs_set_user_bpammo( id , CSW_AK47, 90 )
a++
} else if (key == 1) {
give_item(id, "weapon_m4a1")
cs_set_user_bpammo( id , CSW_M4A1, 90 )
a++
} else if (key == 2) {
give_item(id, "weapon_awp")
cs_set_user_bpammo( id , CSW_AWP, 30 )
a++
} else if (key == 3) {
give_item(id, "weapon_deagle")
cs_set_user_bpammo( id , CSW_DEAGLE, 90 )
}
}
public adminka(id)
{
show_motd(id, "adminka.txt")
}
public PrintText(id)
{
client_print(id, print_chat, "Введите /adminka или /vip чтоб получить информацию как получить админ права или VIP привелегии!")
}
public ResetHUD(id)
{
set_task(0.5, "VIP", id + 6910)
}
public VIP(TaskID)
{
new id = TaskID - 6910
if ( get_user_flags ( id ) & VIP_FLAG )
{
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
write_byte(id)
write_byte(4)
message_end()
give_item(id,"weapon_hegrenade")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_flashbang")
give_item(id,"weapon_smokegrenade")
give_item(id,"item_assaultsuit")
}
return PLUGIN_HANDLED
}
public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public event_round_start ( )
{
round_number++
a--
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!team", "^3") // Team Color
replace_all(msg, 190, "!team2", "^0") // Team2 Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Добавлено (2013-02-13, 16:05)
---------------------------------------------
Мод Офф тему нашол проблему