Может ли кто-нибудь сказать мне, как изменить флаги ?谁能告诉我如何更改权限标志
yes I want to change the permission flag, but I'm not very good at writing pluginsМожет ли кто-нибудь сказать мне, как изменить флаги ?
Check 803 to 816 lines. Seems there are 3 cvars, each of them is set to "t". You can change that in .sma and compile or just change cvars in-game :)Who can tell me how to change the permission flag 22 Фев 2024
yes I want to change the permission flag, but I'm not very good at writing plugins
// Выдача healthnade
public rm_give_rune(id)
{
//HealthNade_GiveNade(id) > 0 не срабатывает как надо
if (HealthNade_HasNade(id))
return NO_RUNE_PICKUP_SUCCESS;
HealthNade_GiveNade(id);
return HealthNade_HasNade(id) ? RUNE_PICKUP_SUCCESS : NO_RUNE_PICKUP_SUCCESS;
}
оккакая ветка? там пару кваров добавил с помощью Макса. ветка
sultvnbek, привет, можно код файлом или под спойлер (не забудь меня упомянуть) я посмотрю в чём проблема учёта. У грены на первый взгляд вообще импульс не сетается.
#pragma semicolon 1
#include <amxmodx>
#include <reapi>
#define DECOY_IMPULSE 1337
#define HEALTH_IMPULSE 4545
#define MOLOTOV_IMPULSE 7691
new g_iModelIndex_LaserBeam;
public plugin_init()
{
register_plugin("Team Grenade Trails", "1.0.0", "fl0wer");
RegisterHookChain(RG_ThrowHeGrenade, "@ThrowHeGrenade_Post", true);
RegisterHookChain(RG_ThrowFlashbang, "@ThrowFlashbang_Post", true);
RegisterHookChain(RG_ThrowSmokeGrenade, "@ThrowSmokeGrenade_Post", true);
}
public plugin_precache()
{
g_iModelIndex_LaserBeam = precache_model("sprites/laserbeam.spr");
}
@ThrowHeGrenade_Post(id)
{
ThrowGrenade_TeamTrail(id, { 255, 0, 0 });
}
@ThrowFlashbang_Post(id)
{
ThrowGrenade_TeamTrail(id, { 255, 255, 255 });
}
@ThrowSmokeGrenade_Post(id)
{
ThrowGrenade_TeamTrail(id, { 0, 255, 0 });
}
ThrowGrenade_TeamTrail(id, color[3])
{
new entity = GetHookChainReturn(ATYPE_INTEGER);
if (is_nullent(entity))
return;
switch(get_entvar(entity, var_impulse)) {
case DECOY_IMPULSE: {
color[0] = 255;
color[1] = 0;
color[2] = 255;
}
case MOLOTOV_IMPULSE: {
color[0] = 255;
color[1] = 150;
color[2] = 0;
}
case HEALTH_IMPULSE: {
color[0] = 255;
color[1] = 150;
color[2] = 150;
}
}
new TeamName:team = get_member(id, m_iTeam);
for (new i = 1; i <= MaxClients; i++)
{
if (!is_user_connected(i))
continue;
if (get_member(i, m_iTeam) != team)
continue;
message_begin_f(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, i);
TE_BeamFollow(entity, g_iModelIndex_LaserBeam, 3, 10, color, 150);
}
}
TE_BeamFollow(entity, spriteIndex, life, lineWidth, color[3], brightness)
{
write_byte(TE_BEAMFOLLOW);
write_short(entity);
write_short(spriteIndex);
write_byte(life);
write_byte(lineWidth);
write_byte(color[0]);
write_byte(color[1]);
write_byte(color[2]);
write_byte(brightness);
message_end();
}