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

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

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

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

Error. <argument3>

gentoos
сообщение 20.1.2013, 18:57
Сообщение #1
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0



Как исправить?

Скрытый текст
#include <amxmodx>
#include <fakemeta>
#include <zp50_core>
#include <zp50_class_zombie>
#include <zp50_class_nemesis>
#include <fun>
#include <engine>
#include <hamsandwich>
#include <cstrike>

new const zclass_name3[] = "Класcик" // name
new const zclass_info3[] = " Баланс " // description
new const zclass_model3[] = "cso_ghost" // model
new const zclass_clawmodel3[] = "v_cso_ghostik.mdl" // claw model
new KNOCKBOMB_HEALER[] = "models/tx/bombjump/v_bomb_invis.mdl"
const zclass_health3 = 2500 // health
const zclass_speed3 = 240 // speed
const Float:zclass_gravity3 = 0.820 // gravity
const Float:zclass_knockback3 = 0.34 // knockback


new g_zclassid1

public plugin_init()
{
register_forward(FM_EmitSound, "EmitSound")
register_event("CurWeapon","handle_gun","be","1=1")
}

public plugin_precache()
{


// Register the new class and store ID for reference
g_zclassid1 = zp_class_zombie_register(zclass_name3, zclass_info3, zclass_model3, zclass_clawmodel3, zclass_health3, zclass_speed3, zclass_gravity3, zclass_knockback3)
precache_model(KNOCKBOMB_HEALER)
}

// User Infected forward
public zp_user_infected_post(id, infector)
{
// Check if the infected player is using our custom zombie class
if (zp_class_zombie_get_current(id) == g_zclassid1 && !zp_class_nemesis_get(id))
emit_sound(id, CHAN_VOICE, g_Classic_Infect_Sound[random(sizeof g_Classic_Infect_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
{
set_pev(id, pev_health, float(pev(id, pev_health)) + 100.0)
}
}





public EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) {
if (sample[0] == 'h' && sample[1] == 'o' && sample[2] == 's' && sample[3] == 't' && sample[4] == 'a' && sample[5] == 'g' && sample[6] == 'e')
return FMRES_SUPERCEDE;

if (!is_user_alive(id) )
return FMRES_IGNORED;

static sound[64];

if (sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't')
{
if (zp_class_zombie_get_current(id) == g_zclassid1 )
{
emit_sound(id, CHAN_VOICE, g_Classic_Pain_Sound[random(sizeof g_Classic_Pain_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
emit_sound(id, channel, sound, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}

if (sample[7] == 'd' && ((sample[8] == 'i' && sample[9] == 'e') || (sample[8] == 'e' && sample[9] == 'a')))
{
if (zp_class_zombie_get_current(id) == g_zclassid1 )
{
emit_sound(id, CHAN_VOICE, g_Classic_Death_Sound[random(sizeof g_Classic_Death_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
emit_sound(id, channel, sound, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}

return FMRES_IGNORED;
}


public handle_gun(id)
{
new weap = get_user_weapon(id)

if(weap == CSW_FLASHBANG && zp_class_zombie_get_current(id) == g_zclassid1 && zp_core_is_zombie(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_HEALER)
}
else if(weap == CSW_SMOKEGRENADE && zp_class_zombie_get_current(id) == g_zclassid1 && zp_core_is_zombie(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_HEALER)
}
else if(weap == CSW_HEGRENADE && zp_class_zombie_get_current(id) == g_zclassid1 && zp_core_is_zombie(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_HEALER)
}

return PLUGIN_HANDLED
}

stock print(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]

static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)

replace_all(szMsg, 190, "^x04", "^4") // green txt
replace_all(szMsg, 190, "^x01", "^1") // orange txt
replace_all(szMsg, 190, "^x03", "^3") // team txt
replace_all(szMsg, 190, "^x00", "^0") // team txt

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()
}
}
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
gentoos
сообщение 20.1.2013, 19:03
Сообщение #2
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

include:
zp50_core
Скрытый текст
#if defined _zp50_core_included
#endinput
#endif
#define _zp50_core_included

#include <zp50_core_const>

#if AMXX_VERSION_NUM >= 175
#pragma reqlib zp50_core
#if !defined AMXMODX_NOAUTOLOAD
#pragma loadlib zp50_core
#endif
#else
#pragma library zp50_core
#endif

/**
* Returns whether a player is a zombie.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_core_is_zombie(id)

/**
* Returns whether a player is the first zombie.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_core_is_first_zombie(id)

/**
* Returns whether a player is the last zombie.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_core_is_last_zombie(id)

/**
* Returns whether a player is the last human.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_core_is_last_human(id)

/**
* Returns number of alive zombies.
*
* @return Zombie count.
*/
native zp_core_get_zombie_count()

/**
* Returns number of alive humans.
*
* @return Human count.
*/
native zp_core_get_human_count()

/**
* Turns a player into a zombie.
*
* @param id Player index to be infected.
* @param attacker Player who triggered the infection. (optional)
* @return True on success, false otherwise.
*/
native zp_core_infect(id, attacker = 0)

/**
* Turns a player into a human.
*
* @param id Player index to be cured.
* @param attacker Player who triggered the cure. (optional)
* @return True on success, false otherwise.
*/
native zp_core_cure(id, attacker = 0)

/**
* Forces a player to become a zombie/human.
*
* Note: use this only when previous checks need to be skipped.
*
* @param id Player index to be infected/cured.
* @return True on success, false otherwise.
*/
native zp_core_force_infect(id)
native zp_core_force_cure(id)

/**
* Sets whether the player will be respawned as zombie or human.
*
* @param id Player index.
* @param zombie True to respawn as zombie, false otherwise.
*/
native zp_core_respawn_as_zombie(id, zombie = true)

/**
* Called when a player gets infected.
*
* @param id Player index who was infected.
* @param attacker Player who triggered the infection.
* (0 if not available, id = attacker if he infected himself)
*/
forward zp_fw_core_infect(id, attacker)
forward zp_fw_core_infect_post(id, attacker)

/**
* Called when a player turns back to human.
*
* @param id Player index who was cured.
* @param attacker Player who triggered the cure.
* (0 if not available, id = attacker if he cured himself)
*/
forward zp_fw_core_cure(id, attacker)
forward zp_fw_core_cure_post(id, attacker)

/**
* Called on a player infect/cure attempt. You can block it by
* returning PLUGIN_HANDLED in your plugin.
*
* @param id Player index who is being infected/cured.
* @param attacker Player who is triggering the infection/cure.
* (0 if not available, id = attacker if he is infecting/curing himself)
*/
forward zp_fw_core_infect_pre(id, attacker)
forward zp_fw_core_cure_pre(id, attacker)

/**
* Called when a player becomes the last zombie/human.
*
* Note: This is called for the first zombie too.
*
* @param id Player index.
*/
forward zp_fw_core_last_zombie(id)
forward zp_fw_core_last_human(id)

/**
* Called when a player spawns, before applying human/zombie attributes to him.
*
* @param id Player index.
*/
forward zp_fw_core_spawn_post(id)


zp50_class_zombie
Скрытый текст
#if defined _zp50_class_zombie_included
#endinput
#endif
#define _zp50_class_zombie_included

#include <zp50_core>
#include <zp50_class_zombie_const>

#if AMXX_VERSION_NUM >= 175
#pragma reqlib zp50_class_zombie
#if !defined AMXMODX_NOAUTOLOAD
#pragma loadlib zp50_class_zombie
#endif
#else
#pragma library zp50_class_zombie
#endif

/**
* Returns a player's current zombie class ID.
*
* @param id Player index.
* @return Internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS if not yet chosen.
*/
native zp_class_zombie_get_current(id)

/**
* Returns a player's next zombie class ID (for the next infection).
*
* @param id Player index.
* @return Internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS if not yet chosen.
*/
native zp_class_zombie_get_next(id)

/**
* Sets a player's next zombie class ID (for the next infection).
*
* @param id Player index.
* @param classid A valid zombie class ID.
* @return True on success, false otherwise.
*/
native zp_class_zombie_set_next(id, classid)

/**
* Returns the default maximum health for a specific zombie class.
*
* Note: does not take into account any kind of HP multipliers.
*
* @param id Player index.
* @param classid A valid zombie class ID.
* @return Maximum amount of health points, -1 on error.
*/
native zp_class_zombie_get_max_health(id, classid)

/**
* Registers a custom class which will be added to the zombie classes menu of ZP.
*
* Note: The returned zombie class ID can be later used to identify
* the class when calling the zp_get_user_zombie_class() natives.
*
* @param name Caption to display on the menu.
* @param description Brief description of the class.
* @param health Class health.
* @param speed Class maxspeed (can be a multiplier).
* @param gravity Class gravity multiplier.
* @return An internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS on failure.
*/
native zp_class_zombie_register(const name[], const description[], health, Float:speed, Float:gravity)

/**
* Registers a custom player model for a given zombie class.
*
* @param classid A valid zombie class ID.
* @param model Player model's short name.
* @return True on success, false otherwise.
*/
native zp_class_zombie_register_model(classid, const model[])

/**
* Registers a custom claw model for a given zombie class.
*
* @param classid A valid zombie class ID.
* @param clawmodel Claw model filename.
* @return True on success, false otherwise.
*/
native zp_class_zombie_register_claw(classid, const clawmodel[])

/**
* Registers a zombie class' knockback multiplier.
*
* @param classid A valid zombie class ID.
* @param knockback Knockback multiplier.
* @return True on success, false otherwise.
*/
native zp_class_zombie_register_kb(classid, Float:knockback)

/**
* Returns a zombie class' ID.
*
* @param name Class name to look for.
* @return Internal zombie class ID, or ZP_INVALID_ZOMBIE_CLASS if not found.
*/
native zp_class_zombie_get_id(const real_name[])

/**
* Returns a zombie class' name.
*
* @param classid A valid zombie class ID.
* @param name The buffer to store the string in.
* @param len Character size of the output buffer.
* @return True on success, false otherwise.
*/
native zp_class_zombie_get_name(classid, name[], len)

/**
* Returns a zombie class' real name (used when registering the class).
*
* @param classid A valid zombie class ID.
* @param name The buffer to store the string in.
* @param len Character size of the output buffer.
* @return True on success, false otherwise.
*/
native zp_class_zombie_get_real_name(classid, real_name[], len)

/**
* Returns a zombie class' description.
*
* @param classid A valid zombie class ID.
* @param description The buffer to store the string in.
* @param len Character size of the output buffer.
* @return True on success, false otherwise.
*/
native zp_class_zombie_get_desc(classid, description[], len)

/**
* Returns a zombie class' knockback multiplier.
*
* @param classid A valid zombie class ID.
* @return Knockback multiplier (float value).
*/
native Float:zp_class_zombie_get_kb(classid)

/**
* Returns number of registered zombie classes.
*
* @return Zombie class count.
*/
native zp_class_zombie_get_count()

/**
* Shows menu with available zombie classes to a player.
*
* @param id Player index.
*/
native zp_class_zombie_show_menu(id)

/**
* Appends text to a class being displayed on the zombie classes menu.
* Use this on the class select pre forward.
*
* @param text Additional text to display.
*/
native zp_class_zombie_menu_text_add(const text[])

/**
* Called when determining whether a class should be available to a player.
*
* Possible return values are:
* - ZP_CLASS_AVAILABLE (show in menu, allow selection)
* - ZP_CLASS_NOT_AVAILABLE (show in menu, don't allow selection)
* - ZP_CLASS_DONT_SHOW (don't show in menu, don't allow selection)
*
* @param id Player index.
* @param classid Internal zombie class ID.
*/
forward zp_fw_class_zombie_select_pre(id, classid)

/**
* Called right after a player selects a class from the menu.
*
* @param id Player index.
* @param classid Internal zombie class ID.
*/
forward zp_fw_class_zombie_select_post(id, classid)


zp50_class_nemesis
Скрытый текст
#if defined _zp50_class_nemesis_included
#endinput
#endif
#define _zp50_class_nemesis_included

#include <zp50_class_zombie>

#if AMXX_VERSION_NUM >= 175
#pragma reqlib zp50_class_nemesis
#if !defined AMXMODX_NOAUTOLOAD
#pragma loadlib zp50_class_nemesis
#endif
#else
#pragma library zp50_class_nemesis
#endif


/**
* Returns whether a player is a Nemesis.
*
* @param id Player index.
* @return True if it is, false otherwise.
*/
native zp_class_nemesis_get(id)

/**
* Forces a player to become a Nemesis.
*
* @param id Player index.
* @return True on success, false otherwise.
*/
native zp_class_nemesis_set(id)

/**
* Returns number of alive nemesis.
*
* @return Nemesis count.
*/
native zp_class_nemesis_get_count()


Отредактировал: gentoos, - 20.1.2013, 19:04
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Andrei
сообщение 20.1.2013, 19:05
Сообщение #3


Стаж: 15 лет

Сообщений: 1335
Благодарностей: 693
Полезность: 740

Где 68 линия ?

Отредактировал: Bos93, - 20.1.2013, 19:05
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
gentoos
сообщение 20.1.2013, 19:06
Сообщение #4
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

Цитата(Bos93 @ 20.1.2013, 19:05) *
Где 68 линия ?

g_zclassid1 = zp_class_zombie_register(zclass_name3, zclass_info3, zclass_model3, zclass_clawmodel3, zclass_health3, zclass_speed3, zclass_gravity3, zclass_knockback3)
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Andrei
сообщение 20.1.2013, 19:10
Сообщение #5


Стаж: 15 лет

Сообщений: 1335
Благодарностей: 693
Полезность: 740

Цитата(gentoos @ 20.1.2013, 20:06) *
g_zclassid1 = zp_class_zombie_register(zclass_name3, zclass_info3, zclass_model3, zclass_clawmodel3, zclass_health3, zclass_speed3, zclass_gravity3, zclass_knockback3)


zp_class_zombie_register(const name[], const description[], health, Float:speed, Float:gravity)

Ты нарушил аргументы,регистрация немного иначе в zp 508,если это он,или немного старая версия.

Подключи zombieplague и скомпилится,так как zp508 поддерживает 4.3
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
gentoos
сообщение 20.1.2013, 19:38
Сообщение #6
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

Цитата(Bos93 @ 20.1.2013, 19:10) *
zp_class_zombie_register(const name[], const description[], health, Float:speed, Float:gravity)

Ты нарушил аргументы,регистрация немного иначе в zp 508,если это он,или немного старая версия.

Подключи zombieplague и скомпилится,так как zp508 поддерживает 4.3

1) Не понял...
2) 508 у меня
3) Не вариант,данную возможность отключил,то есть юзаю только 508
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Andrei
сообщение 20.1.2013, 19:56
Сообщение #7


Стаж: 15 лет

Сообщений: 1335
Благодарностей: 693
Полезность: 740

Посмотри как происходит регистрация классов в zp508 ( Посмотреть класс )
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
gentoos
сообщение 20.1.2013, 20:16
Сообщение #8
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

Цитата(Bos93 @ 20.1.2013, 19:56) *
Посмотри как происходит регистрация классов в zp508 ( Посмотреть класс )

Вчера 4 класса запилил,с этим не могу разобраться

Цитата
public plugin_precache()
{

// Register the new class and store ID for reference
g_zclassid1 = zp_class_zombie_register(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}

// User Infected forward
public zp_user_infected_post(id, infector)
{
// Check if the infected player is using our custom zombie class
if (zp_core_is_zombie(id) == g_zclassid1 && !zp_class_nemesis_get(id))
emit_sound(id, CHAN_VOICE, g_Classic_Infect_Sound[random(sizeof g_Classic_Infect_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
{
set_pev(id, pev_health, float(pev(id, pev_health)) + 100.0)
}
}


Все , что осталось от проверок,остальное вырезал

Отредактировал: gentoos, - 20.1.2013, 20:16
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
gentoos
сообщение 20.1.2013, 20:42
Сообщение #9
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

То есть фича осталась
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
gentoos
сообщение 21.1.2013, 12:49
Сообщение #10
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

psych.gif Все утро пытался исправить - нифига.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Andrei
сообщение 21.1.2013, 13:08
Сообщение #11


Стаж: 15 лет

Сообщений: 1335
Благодарностей: 693
Полезность: 740

Скрытый текст
Код
#include <amxmodx>
#include <fakemeta>
#include <zp50_core>
#include <zp50_class_zombie>
#include <zp50_class_nemesis>
#include <fun>
#include <engine>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>

new const zclass_name3[] = "Класcик" // name
new const zclass_info3[] = " Баланс " // description
new const zclass_model3[] = "cso_ghost" // model
new const zclass_clawmodel3[] = "v_cso_ghostik.mdl" // claw model
new KNOCKBOMB_HEALER[] = "models/tx/bombjump/v_bomb_invis.mdl"
const zclass_health3 = 2500 // health
const zclass_speed3 = 240 // speed
const Float:zclass_gravity3 = 0.820 // gravity
const Float:zclass_knockback3 = 0.34 // knockback


new g_zclassid1

public plugin_init()
{
register_forward(FM_EmitSound, "EmitSound")
register_event("CurWeapon","handle_gun","be","1=1")
}

public plugin_precache()
{


// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name3, zclass_info3, zclass_model3, zclass_clawmodel3, zclass_health3, zclass_speed3, zclass_gravity3, zclass_knockback3)
precache_model(KNOCKBOMB_HEALER)
}

// User Infected forward
public zp_user_infected_post(id, infector)
{
// Check if the infected player is using our custom zombie class
if (zp_class_zombie_get_current(id) == g_zclassid1 && !zp_class_nemesis_get(id))
// emit_sound(id, CHAN_VOICE, g_Classic_Infect_Sound[random(sizeof g_Classic_Infect_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
{
set_pev(id, pev_health, float(pev(id, pev_health)) + 100.0)
}
}





public EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) {
if (sample[0] == 'h' && sample[1] == 'o' && sample[2] == 's' && sample[3] == 't' && sample[4] == 'a' && sample[5] == 'g' && sample[6] == 'e')
return FMRES_SUPERCEDE;

if (!is_user_alive(id) )
return FMRES_IGNORED;

static sound[64];

if (sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't')
{
if (zp_class_zombie_get_current(id) == g_zclassid1 )
{
//emit_sound(id, CHAN_VOICE, g_Classic_Pain_Sound[random(sizeof g_Classic_Pain_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
emit_sound(id, channel, sound, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}

if (sample[7] == 'd' && ((sample[8] == 'i' && sample[9] == 'e') || (sample[8] == 'e' && sample[9] == 'a')))
{
if (zp_class_zombie_get_current(id) == g_zclassid1 )
{
//emit_sound(id, CHAN_VOICE, g_Classic_Death_Sound[random(sizeof g_Classic_Death_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
emit_sound(id, channel, sound, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}

return FMRES_IGNORED;
}


public handle_gun(id)
{
new weap = get_user_weapon(id)

if(weap == CSW_FLASHBANG && zp_class_zombie_get_current(id) == g_zclassid1 && zp_core_is_zombie(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_HEALER)
}
else if(weap == CSW_SMOKEGRENADE && zp_class_zombie_get_current(id) == g_zclassid1 && zp_core_is_zombie(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_HEALER)
}
else if(weap == CSW_HEGRENADE && zp_class_zombie_get_current(id) == g_zclassid1 && zp_core_is_zombie(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_HEALER)
}

return PLUGIN_HANDLED
}

stock print(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]

static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)

replace_all(szMsg, 190, "^x04", "^4") // green txt
replace_all(szMsg, 190, "^x01", "^1") // orange txt
replace_all(szMsg, 190, "^x03", "^3") // team txt
replace_all(szMsg, 190, "^x00", "^0") // team txt

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()
}
}
}


Отредактировал: Bos93, - 21.1.2013, 13:12
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
gentoos
сообщение 21.1.2013, 13:17
Сообщение #12
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0



Отредактировал: gentoos, - 21.1.2013, 14:57
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
gentoos
сообщение 21.1.2013, 15:01
Сообщение #13
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

Цитата(gentoos @ 20.1.2013, 20:38) *
3) Не вариант,данную возможность отключил,то есть юзаю только 508

Цитата
zp50_zp43_compat.amxx
- отключено

Вот , что стояло на старой сборке:

Скрытый текст

Код
#include <amxmodx>
#include <fun>
#include <fakemeta_util>
#include <fakemeta>
#include <hamsandwich>
#include <zp50_core>
#include <zp50_class_zombie>
#include <zp50_colorchat>
#include <engine>
#include <cs_weap_models_api>


#define TASK_COOLDOWN    22222
#define TASK_STEALTH    33333

new g_zclass_ghost

new const zombieclass6_name[] = "Ghost"
new const zombieclass6_info[] = "[ Stealth ]"
new const zombieclass6_models[][] = { "zombie_ghost" }
new const zombieclass6_clawmodels[] = "models/zombie/light/v_ghostnew.mdl"
new const zombieclass6_invis_clawmodel[] = "models/zombie/light/v_ghost2inv.mdl"
const zombieclass6_health = 2250
const Float:zombieclass6_speed = 0.80
const Float:zombieclass6_gravity = 1.0
const Float:zombieclass6_knockback = 1.0

new g_maxplayers

#define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2) %1 |= (1 << (%2 & 31))
#define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

new g_IsStealth
new g_IsCooldown

new cvar_stealth_time, cvar_stealth_cooldown

new const sound_ghost_stealth[] = "ghost_invisible_start.wav"
new const sound_ghost_stealth_end[] = "ghost_invisible_end.wav"

public plugin_init()
{    
    register_clcmd("drop", "use_ability_one")
    register_logevent("roundStart", 2, "1=Round_Start")
    g_maxplayers = get_maxplayers()

    cvar_stealth_time = register_cvar("zp_ghost_stealth_time", "10.0")
    cvar_stealth_cooldown = register_cvar("zp_ghost_stealth_cooldown", "30.0")
}

public plugin_precache()
{
    new index
    
    g_zclass_ghost = zp_class_zombie_register(zombieclass6_name, zombieclass6_info, zombieclass6_health, zombieclass6_speed, zombieclass6_gravity)
    zp_class_zombie_register_kb(g_zclass_ghost, zombieclass6_knockback)
    for (index = 0; index < sizeof zombieclass6_models; index++)
        zp_class_zombie_register_model(g_zclass_ghost, zombieclass6_models[index])
    zp_class_zombie_register_claw(g_zclass_ghost, zombieclass6_clawmodels[index])
        
    precache_sound(sound_ghost_stealth)
    precache_sound(sound_ghost_stealth_end)
    precache_model(zombieclass6_invis_clawmodel)
}

public plugin_natives()
{
    register_native("zp_core_is_ghost", "native_get_ghost")
}

public native_get_ghost(id)
{
    zp_class_zombie_get_current(id) == g_zclass_ghost
}

public zp_fw_core_infect_post(id, infector)
{
     if(zp_core_is_zombie(id) && zp_class_zombie_get_current(id) == g_zclass_ghost)
     {
          zp_colored_print(id, "Ability - Stealth, when you will use for some time stealth")
          flag_unset(g_IsStealth, id)
          flag_unset(g_IsCooldown, id)
     }
}

public zp_fw_core_cure_post(id)
{
    fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
    fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255)
    flag_unset(g_IsStealth, id)
    flag_unset(g_IsCooldown, id)
}

public roundStart()
{
    for (new i = 1; i <= g_maxplayers; i++)
    {
    flag_unset(g_IsCooldown, i)
    flag_unset(g_IsStealth, i)
    }
}

public use_ability_one(id)
{

    if(is_valid_ent(id) && is_user_alive(id) && zp_core_is_zombie(id) && zp_class_zombie_get_current(id) == g_zclass_ghost)
    {
        if(!flag_get(g_IsCooldown, id))
        {
            fm_set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0)
            emit_sound(id, CHAN_STREAM, sound_ghost_stealth, 1.0, ATTN_NORM, 0, PITCH_NORM)
            set_task(get_pcvar_float(cvar_stealth_time), "ghost_make_visible", id+TASK_STEALTH)
            cs_set_player_view_model(id, CSW_KNIFE, zombieclass6_invis_clawmodel)
            flag_set(g_IsCooldown, id)
            flag_set(g_IsStealth, id)
        }
    }
}

public ghost_make_visible(taskid)
{
    new id = taskid - TASK_STEALTH
    
    if(is_valid_ent(id) && zp_core_is_zombie(id) && zp_class_zombie_get_current(id) == g_zclass_ghost && flag_get(g_IsStealth, id))
    {
        flag_unset(g_IsStealth, id)
        fm_set_user_rendering(id)
        cs_set_player_view_model(id, CSW_KNIFE, zombieclass6_clawmodels)
        emit_sound(id, CHAN_STREAM, sound_ghost_stealth_end, 1.0, ATTN_NORM, 0, PITCH_NORM)
        set_task(get_pcvar_float(cvar_stealth_cooldown), "reset_cooldown", id+TASK_COOLDOWN)
    }
}

public reset_cooldown(taskid)
{
    new id = taskid - TASK_COOLDOWN
    
    if(is_valid_ent(id) && zp_core_is_zombie(id) && zp_class_zombie_get_current(id) == g_zclass_ghost && flag_get(g_IsCooldown, id))
    {
        flag_unset(g_IsCooldown, id)    
        zp_colored_print(id, "You can use stealth")
    }
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
gentoos
сообщение 21.1.2013, 15:13
Сообщение #14
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

То есть в 5.0 нельзя использовать данный регистр
Код
zp_register_zombie_class

psych.gif Пле,забыл как в прошлый раз решил эту проблему
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
gentoos
сообщение 21.1.2013, 16:00
Сообщение #15
Стаж: 13 лет

Сообщений: 671
Благодарностей: 54
Полезность: 0

psych.gif Турутутуту
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Andrei
сообщение 21.1.2013, 16:42
Сообщение #16


Стаж: 15 лет

Сообщений: 1335
Благодарностей: 693
Полезность: 740

Я же говорю,регистрация там иначе,посмотри любой дефолт класс и сделай так же.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: