Цитата(Unknown @ 4.6.2016, 14:36)

Не несите бред! Быдлокода и так хватает. Все делается проще.
Автор напиши мне в вк помогу (почему именно вк потому что бываю тут редко. да и еще тут мегамодеры удаляют посты дают % за помощь)
Интересно узнать твой вариант.
Я рекомендую использовать:
Код:
/**
* Hooks the virtual table for the specified entity's class.
* An example would be: RegisterHam(Ham_TakeDamage, id, "player_hurt");
* Look at the Ham enum for parameter lists.
* Note: This will cause hooks for the entire internal class that the entity is
* not exclusively for the provided entity.
*
* @param function The function to hook.
* @param EntityId The entity classname to hook.
* @param callback The forward to call.
* @param post Whether or not to forward this in post.
* @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off.
*/
native HamHook:RegisterHamFromEntity(Ham:function, EntityId, const Callback[], Post=0);
В коде создания пушки, нужно добавить что-то типо:
Код:
RegisterHamFromEntity(Ham_TakeDamage, MyMegaSuperUltaPuperSentryEntity, false);
Событие будет вызываться только для пушки и не нужно будет всяких костылей с проверками pev_classname