• Регистрация на форуме отключена.
    Она будет открываться первого числа каждого месяца на 24 часа.

    Если вы хотите поделиться чем-то интересным и полезным, то обратитесь к администраторам в >> телеграм <<

Поиск afk slay plugin

Сообщения
36
Реакции
-3
Предупреждения
1
Помог
1 раз(а)
Hello ,

i am looking for AKF slay not kick/spectator . i want only afk slay plugin

afk_manager and afk_control tried but always make server lag for me.

Thanks
 
  • Не нравится
Реакции: Murz

fox

Сообщения
117
Реакции
36
Помог
6 раз(а)
egcmasti,
Код:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#define TIME 25.0
new Float:player_origin[33][3]
 
new const thunder_sound[] = "ambience/thunder_clap.wav";
new g_Lightning, g_Smoke;
 
public plugin_init()
{
    RegisterHam(Ham_Spawn, "player", "e_Spawn", 1);
}
 
public plugin_precache()
{
    precache_sound(thunder_sound)
    g_Lightning = precache_model("sprites/lgtning.spr")
    g_Smoke = precache_model("sprites/steam1.spr")
}
 
public e_Spawn(id)
{
    if(is_user_alive(id)&& !( get_user_flags( id ) & ADMIN_IMMUNITY ) )
    {
        set_task(0.8, "get_spawn", id);
    }
    return HAM_IGNORED;
}
 
public get_spawn(id)
{
    pev(id, pev_origin, player_origin[id]);
    set_task(TIME, "check_afk", id);
}
 
public check_afk(id)
{
    if(is_user_alive(id) && same_origin(id) )
    {
        user_kill(id)
        magnificcentKill(id)
        new name[32]
        get_user_name(id, name, charsmax(name));
        client_print(0, print_chat, "AFK: SLAY %s", name);
    }
}
 
public same_origin(id)
{
    new Float:origin[3];
    pev(id, pev_origin, origin);
    for(new i = 0; i < 3; i++)
        if(origin[i] != player_origin[id][i])
        return 0;
    return 1;
}
 
stock magnificcentKill(const id)
{
    new iOrigin[3], iPos[3]
  
    get_user_origin(id, iOrigin)
    iOrigin[2] -= 26
    iPos[0] = iOrigin[0] + 150
    iPos[1] = iOrigin[1] + 150
    iPos[2] = iOrigin[2] + 800
      
    makeThunder(iPos, iOrigin)
    makeSmoke(iOrigin, 10, 10)
    makeBlood(iOrigin)
  
    user_silentkill(id)
}
 
stock makeBlood(iorigin[3])
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(TE_LAVASPLASH)
    write_coord(iorigin[0])
    write_coord(iorigin[1])
    write_coord(iorigin[2])
    message_end()
}
 
stock makeSmoke(iorigin[3], scale, framerate )
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(TE_SMOKE)
    write_coord(iorigin[0])
    write_coord(iorigin[1])
    write_coord(iorigin[2])
    write_short(g_Smoke)
    write_byte(scale)
    write_byte(framerate)
    message_end()
}
 
stock makeThunder(start[3], end[3])
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(TE_BEAMPOINTS)
    write_coord(start[0])
    write_coord(start[1])
    write_coord(start[2])
    write_coord(end[0])
    write_coord(end[1])
    write_coord(end[2])
    write_short(g_Lightning)
    write_byte(1)
    write_byte(5)
    write_byte(7)
    write_byte(20)
    write_byte(30)
    write_byte(200)
    write_byte(200)
    write_byte(200)
    write_byte(200)
    write_byte(200)
    message_end()
  
    message_begin(MSG_PVS, SVC_TEMPENTITY, end)
    write_byte(TE_SPARKS)
    write_coord(end[0])
    write_coord(end[1])
    write_coord(end[2])
    message_end()
  
    emit_sound(0 ,CHAN_ITEM, thunder_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
 
Сообщения
13
Реакции
-4
Предупреждения
26
Код:
#include <amxmisc>
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new Float:player_origin[33][3];

public plugin_init()
{
    register_plugin("Away From Keyboard Slayer", "0.1", "Cruzer //");
    
    register_cvar("afks_version", "0.1Private (LuxServ)", FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY);
    register_cvar("afks_author", "Cruzer //", FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY);
    
    RegisterHam(Ham_Spawn, "player", "ham_spawn", 1);
}

public plugin_modules()
{
    require_module("amxmisc");
    require_module("amxmodx");
    require_module("fakemeta");
    require_module("hamsandwich");
}

public ham_spawn(id)
{
    remove_task(id)
    
    if(is_user_alive(id))
    {
    set_task(0.8, "plugin_get", id);
    }
    return HAM_IGNORED;
}

public plugin_get(id)
{
    pev(id, pev_origin, player_origin[id]);
    
    set_task(60.0, "plugin_check", id);
}

public plugin_check(id)
{
    if(is_user_alive(id))
    {
    if(same_origin(id))
    {
    user_kill(id);
    
    new name[33];
    
    get_user_name(id, name, 32);
    
    client_print(0, print_chat,  "%s has been killed. Reason: away from keyboard", name);
        }
    }
}

public same_origin(id)
{
    new Float:origin[3];
    
    pev(id, pev_origin, origin);
    
    for(new i=0; i<3; i++)
    
    if(origin[i]!=player_origin[id][i])
    
    return 0;
    return 1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
 
  • Не нравится
Реакции: Ayk
Сообщения
36
Реакции
-3
Предупреждения
1
Помог
1 раз(а)
Код:
#include <amxmisc>
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new Float:player_origin[33][3];

public plugin_init()
{
    register_plugin("Away From Keyboard Slayer", "0.1", "Cruzer //");
   
    register_cvar("afks_version", "0.1Private (LuxServ)", FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY);
    register_cvar("afks_author", "Cruzer //", FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY);
   
    RegisterHam(Ham_Spawn, "player", "ham_spawn", 1);
}

public plugin_modules()
{
    require_module("amxmisc");
    require_module("amxmodx");
    require_module("fakemeta");
    require_module("hamsandwich");
}

public ham_spawn(id)
{
    remove_task(id)
   
    if(is_user_alive(id))
    {
    set_task(0.8, "plugin_get", id);
    }
    return HAM_IGNORED;
}

public plugin_get(id)
{
    pev(id, pev_origin, player_origin[id]);
   
    set_task(60.0, "plugin_check", id);
}

public plugin_check(id)
{
    if(is_user_alive(id))
    {
    if(same_origin(id))
    {
    user_kill(id);
   
    new name[33];
   
    get_user_name(id, name, 32);
   
    client_print(0, print_chat,  "%s has been killed. Reason: away from keyboard", name);
        }
    }
}

public same_origin(id)
{
    new Float:origin[3];
   
    pev(id, pev_origin, origin);
   
    for(new i=0; i<3; i++)
   
    if(origin[i]!=player_origin[id][i])
   
    return 0;
    return 1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/

CAN You modify to admins cannot be slayed? Thanks
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу