Участник
Пользователь
- Сообщения
- 278
- Реакции
- 137
Hi, I wonder something about this command. When I use "client_impulse", it works perfect. But when I change to RG_CBasePlayer_ImpulseCommands, i have a problem.
When I use "impulse 201", it starts and never stops. How I can make it stop?
When I use "impulse 201", it starts and never stops. How I can make it stop?
Код:
#include <amxmodx>
#include <engine>
#include <reapi>
public plugin_init() {
RegisterHookChain(RG_CBasePlayer_ImpulseCommands, "CBasePlayer_ImpulseCommands", .post=false);
}
/* IT NEVER STOPS AND ALWAYS WRITE "Lololol" */
public CBasePlayer_ImpulseCommands(const id)
{
static impulse;
impulse = get_entvar(id, var_impulse);
if(impulse == 201)
{
client_print(id, print_chat, "Lololol");
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}
/* Working perfecto ! :) */
public client_impulse(id, impulse)
{
if(impulse == 201)
{
client_print(id, print_chat, "Lololol");
return 1;
}
return 0;
}