Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

Ошибка в плагине

, Ошибка в плагине
Статус пользователя Nevidimka95
сообщение 5.2.2015, 21:13
Сообщение #1
Стаж: 11 лет

Сообщений: 39
Благодарностей: 2
Полезность: 41

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Invalid expression, assumed zero on line 53
Error: Invalid expression, assumed zero on line 53
Error: Invalid expression, assumed zero on line 53
Error: Too many error messages on one line on line 53

Compilation aborted.
4 Errors.
Could not locate output file C:\Users\Nevidimka\Desktop\zp_heal_zombie.amx (compile failed).

выделяет вот эту строку:
if((pev(id, pev_health) < float(native zp_class_zombie_get_max_health(id, g_zclass_heal))) && (last_use[id] + 20.0 <= get_gametime()))

Сам плагин:
Код:

#include <amxmodx>
#include <fakemeta>
#include <zp50_class_zombie>
#include <zp50_core>
#include <zp50_class_nemesis>

#define heal_sound "heal.wav"

new const zclass_name[] = "Heal"
new const zclass_info[] = "Zombie"
new const zclass_models[][] = { "heal" }
new const zclass_clawmodels[][] = { "models/zombie_plague/v_heal_knife.mdl" }
const zclass_health = 4500
const Float:zclass_speed = 0.75
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 0.0

new g_zclass_heal;
new Float:last_use[33];

public plugin_init()
{
register_plugin("[ZP] Zombie Class: Heal Zombie", "0.1", "WPMG Team")
register_clcmd("drop", "use_skill")
}

public plugin_precache()
{
new index
g_zclass_heal = zp_class_zombie_register(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
zp_class_zombie_register_kb(g_zclass_heal, zclass_knockback)
for (index = 0; index < sizeof zclass_models; index++)
zp_class_zombie_register_model(g_zclass_heal, zclass_models[index])
for (index = 0; index < sizeof zclass_clawmodels; index++)
zp_class_zombie_register_claw(g_zclass_heal, zclass_clawmodels[index])

precache_sound(heal_sound)
}

public zp_core_infect_post(id, infector)
{
if(zp_class_zombie_get_current(id) == g_zclass_heal)
{
client_printcolor(id, "^4[ZP] ^1Press ^4^"G^" ^1for cure all your health.")
last_use[id] = 0.0
}
}

public use_skill(id)
{
if(is_user_alive(id) && !zp_class_nemesis_get(id) && zp_core_is_zombie(id) && (zp_class_zombie_get_current(id) == g_zclass_heal))
{
if((pev(id, pev_health) < float(native zp_class_zombie_get_max_health(id, g_zclass_heal))) && (last_use[id] + 20.0 <= get_gametime()))
{
last_use[id] = get_gametime();

set_pev(id, pev_health, float(native zp_class_zombie_get_max_health(id, g_zclass_heal)))
emit_sound(id, CHAN_ITEM, heal_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)

message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), { 0, 0, 0 }, id)
write_short(1<<10)
write_short(1<<12)
write_short(0x0000)
write_byte(50)
write_byte(150)
write_byte(50)
write_byte(200)
message_end()

return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}

stock client_printcolor(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]
static szMsg[191]

vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4")
replace_all(szMsg, 190, "/y", "^1")
replace_all(szMsg, 190, "/t", "^3")
replace_all(szMsg, 190, "/w", "^0")

if(id) iPlayers[0] = id
else get_players(iPlayers, iCount, "ch")

for(new i = 0; i < iCount; i++)
{
if(is_user_connected(iPlayers[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i])
write_byte(iPlayers[i])
write_string(szMsg)
message_end()
}
}
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя Nevidimka95
сообщение 6.2.2015, 14:32
Сообщение #2
Стаж: 11 лет

Сообщений: 39
Благодарностей: 2
Полезность: 41

Код:
public use_skill(id)
{
if(is_user_alive(id) && !zp_class_nemesis_get(id) && zp_core_is_zombie(id) && (zp_class_zombie_get_current(id) == g_zclass_heal))
{
if((pev(id, pev_health) < float(zp_class_zombie_get_max_health(id, g_zclass_heal))) && (last_use[id] + 20.0 <= get_gametime()))
{
last_use[id] = get_gametime();

set_pev(id, pev_health, float(zp_class_zombie_get_max_health(id, g_zclass_heal)))
emit_sound(id, CHAN_ITEM, heal_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)

message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), { 0, 0, 0 }, id)
write_short(1<<10)
write_short(1<<12)
write_short(0x0000)
write_byte(50)
write_byte(150)
write_byte(50)
write_byte(200)
message_end()

return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Ответить в данную темуНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: