- Ошибка
-
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(28) : error 021: symbol already defined: "client_print_color"
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(31) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(33) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(36) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(40) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(57) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(59) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(63) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(68) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(70) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(74) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(76) : warning 218: old style prototypes used with optional semicolumns
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(77) : error 054: unmatched closing brace
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(79) : warning 218: old style prototypes used with optional semicolumns
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(80) : error 054: unmatched closing brace
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(83) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(88) : error 021: symbol already defined: "get_players"
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(89) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(91) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(96) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(98) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(101) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(105) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(106) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(109) : error 021: symbol already defined: "ArrayPushCell"
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(113) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(121) : error 010: invalid function or declaration
// C:\Users\Maxim\Desktop\amxmodx\scripting\include\colorchat.inc(123) : error 010: invalid function or declaration
- Компилятор
- Локальный
- Amx Mod X
- 1.9.0
- Исходный код
-
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <colorchat>
#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define PLUGIN "Shop for Knife"
#define VERSION "0.1beta"
#define AUTHOR "-NegaTiV-"
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_8|MENU_KEY_0
new Gravity[33], Speed[33], Health[33], HeGrenade[33], FreezGrenade[33], Rendering[33], Bhop[33], Bunny_Hop[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menu("Menu 1", keys, "func_menu")
register_clcmd("say /shop", "ShopKnife")
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
}
public player_spawn(id)
{
Gravity[id] = 0
Speed[id] = 0
Health[id] = 0
HeGrenade[id] = 0
FreezGrenade[id] = 0
Rendering[id] = 0
Bhop[id] = 0
Bunny_Hop[id] = false
}
public client_connect(id)
{
Bunny_Hop[id] = false
}
public ShopKnife(id)
{
static menu[1024], len
len = 0
new my_money = cs_get_user_money(id)
// Menu
if(get_user_flags(id) & ADMIN_LEVEL_A) {
len += formatex(menu[len], charsmax(menu) - len, "\r[\yМагазин\r] \wСкидка: \yЕсть^n^n")
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r[\yМагазин\r] \wСкидка: \rНету^n^n")
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 5000 || Gravity[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r1. \dГравитация (\r5000$\d)^n")
keys &= ~MENU_KEY_1
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r1. \wГравитация \d(\r5000$\d)^n")
keys |= MENU_KEY_1
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Gravity[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r1. \dГравитация (\r10000$\d)^n")
keys &= ~MENU_KEY_1
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r1. \wГравитация \d(\r10000$\d)^n")
keys |= MENU_KEY_1
}
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 5000 || Speed[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r1. \dСкорость (\r5000$\d)^n")
keys &= ~MENU_KEY_2
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r1. \wСкорость \d(\r5000$\d)^n")
keys |= MENU_KEY_2
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Speed[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r1. \dСкорость (\r10000$\d)^n")
keys &= ~MENU_KEY_2
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r1. \wСкорость \d(\r10000$\d)^n")
keys |= MENU_KEY_2
}
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 5000 || Health[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r3. \d+255 HP (\r5000$\d)^n")
keys &= ~MENU_KEY_3
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r3. \w+255 HP \d(\r5000$\d)^n")
keys |= MENU_KEY_3
}
} else {
if(!is_user_alive(id) || my_money < 8000 || Health[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r3. \d+255 HP (\r8000$\d)^n")
keys &= ~MENU_KEY_3
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r3. \w+255 HP \d(\r8000$\d)^n")
keys |= MENU_KEY_3
}
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 4500 || HeGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r4. \dВзрывная граната (\r4500$\d)^n")
keys &= ~MENU_KEY_4
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r4. \wВзрывная граната \d(\r4500$\d)^n")
keys |= MENU_KEY_4
}
} else {
if(!is_user_alive(id) || my_money < 9000 || HeGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r4. \dВзрывная граната (\r9000$\d)^n")
keys &= ~MENU_KEY_4
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r4. \wВзрывная граната \d(\r9000$\d)^n")
keys |= MENU_KEY_4
}
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 4500 || FreezGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r4. \dЗамораживающая гараната (\r4500$\d)^n")
keys &= ~MENU_KEY_5
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r4. \wЗамораживающая гараната \d(\r4500$\d)^n")
keys |= MENU_KEY_5
}
} else {
if(!is_user_alive(id) || my_money < 16000 || FreezGrenade[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r4. \dЗамораживающая гараната (\r9000$\d)^n")
keys &= ~MENU_KEY_5
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r4. \wЗамораживающая гараната \d(\r9000$\d)^n")
keys |= MENU_KEY_5
}
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 12000 || Rendering[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r6. \dНевидимость (\r12000$\d)^n")
keys &= ~MENU_KEY_6
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r6. \wНевидимость \d(\r12000$\d)^n")
keys |= MENU_KEY_6
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Rendering[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r6. \dНевидимость (\r16000$\d)^n")
keys &= ~MENU_KEY_6
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r6. \wНевидимость \d(\r16000$\d)^n")
keys |= MENU_KEY_6
}
}
if(get_user_flags(id) & ADMIN_LEVEL_A)
{
if(!is_user_alive(id) || my_money < 8000 || Bhop[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r8. \dБанихоп (\r8000$\d)^n^n")
keys &= ~MENU_KEY_8
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r8. \wБанихоп \d(\r8000$\d)^n^n")
keys |= MENU_KEY_8
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Health[id] >= 1)
{
len += formatex(menu[len], charsmax(menu) - len, "\r8. \dБанихоп (\r16000$\d)^n^n")
keys &= ~MENU_KEY_8
} else {
len += formatex(menu[len], charsmax(menu) - len, "\r8. \wБанихоп \d(\r16000$\d)^n^n")
keys |= MENU_KEY_8
}
}
len += formatex(menu[len], charsmax(menu) - len, "\r0. \wВыход")
keys |= MENU_KEY_0
show_menu(id, keys, menu, -1, "Menu 1")
return PLUGIN_HANDLED;
}
public func_menu(id, key)
{
new my_money = cs_get_user_money(id)
switch(key)
{
case 0:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 5000 || Gravity[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 5000)
set_user_gravity(id, 0.5)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Гравитацию")
Gravity[id]++
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Gravity[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 10000)
set_user_gravity(id, 0.5)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Гравитацию")
Gravity[id]++
}
}
}
case 1:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 5000 || Speed[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 5000)
set_user_maxspeed(id, 320.0)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Скорость")
Speed[id]++
}
} else {
if(!is_user_alive(id) || my_money < 10000 || Gravity[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 10000)
set_user_maxspeed(id, 320.0)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Скорость")
Speed[id]++
}
}
}
case 2:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 5000 || Health[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 5000)
set_user_health(id, get_user_health(id) + 255)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4+255 HP")
Health[id]++
}
} else {
if(!is_user_alive(id) || my_money < 8000 || Health[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 8000)
set_user_health(id, get_user_health(id) + 255)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4+255 HP")
Health[id]++
}
}
}
case 3:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 4500 || HeGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 4500)
give_item(id, "weapon_hegrenade")
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Взрывную гранату")
HeGrenade[id]++
}
} else {
if(!is_user_alive(id) || my_money < 9000 || HeGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 9000)
give_item(id, "weapon_hegrenade")
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Взрывную гранату")
HeGrenade[id]++
}
}
}
case 4:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 4500 || FreezGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 4500)
give_item(id, "weapon_smokegrenade")
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Замораживающую гранату")
FreezGrenade[id]++
}
} else {
if(!is_user_alive(id) || my_money < 9000 || FreezGrenade[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 9000)
give_item(id, "weapon_smokegrenade")
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Замораживающую гранату")
FreezGrenade[id]++
}
}
}
case 5:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 12000 || Rendering[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 12000)
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Невидимость")
Rendering[id]++
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Rendering[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 16000)
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,20)
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Невидимость")
Rendering[id]++
}
}
}
case 6:{
if(get_user_flags(id) & ADMIN_LEVEL_A) {
if(!is_user_alive(id) || my_money < 8000 || Bhop[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 8000)
Bunny_Hop[id] = true
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Банихоп")
Bhop[id]++
}
} else {
if(!is_user_alive(id) || my_money < 16000 || Bhop[id] >= 1) {
return PLUGIN_CONTINUE;
} else {
cs_set_user_money(id, my_money - 16000)
Bunny_Hop[id] = true
ColorChat(id, NORMAL, "^1[^4Shop^1] ^3Вы купили: ^4Банихоп")
Bhop[id]++
}
}
}
}
return PLUGIN_HANDLED;
}
public client_PreThink(id)
{
entity_set_float(id, EV_FL_fuser2, 0.0)
if(entity_get_int(id, EV_INT_button) & 2)
{
new flags = entity_get_int(id, EV_INT_flags)
if(flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if(entity_get_int(id, EV_INT_waterlevel) >= 2)
return PLUGIN_CONTINUE
if(!(flags & FL_ONGROUND))
return PLUGIN_CONTINUE
new Float:vecVelocity[3]
entity_get_vector(id, EV_VEC_velocity, vecVelocity)
if(Bunny_Hop[id])
vecVelocity[2] += 250.0
entity_set_vector(id, EV_VEC_velocity, vecVelocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
return PLUGIN_CONTINUE
}
Пробовал 2 разных инклуда colorchat, ничего не получается
В этой теме было размещено решение! Перейти к решению.