Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 1,041
» Latest member: KeldronProosesop
» Forum threads: 13
» Forum posts: 13

Full Statistics

Online Users
There are currently 59 online users.
» 0 Member(s) | 59 Guest(s)

Latest Threads
Loading Music
Forum: Showcase
Last Post: marcudaniel1337
07-29-2024, 07:01 PM
» Replies: 0
» Views: 1,267
Blind
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:31 PM
» Replies: 0
» Views: 1,635
Fake Bots
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:29 PM
» Replies: 0
» Views: 1,681
Chat Messages
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:27 PM
» Replies: 0
» Views: 1,579
Connect/Disconnect sounds
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:25 PM
» Replies: 0
» Views: 1,210
Gag
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:24 PM
» Replies: 0
» Views: 1,184
No self gauss
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:21 PM
» Replies: 0
» Views: 1,149
Ping Kicker
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:19 PM
» Replies: 0
» Views: 1,167
Spectator Fix
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:17 PM
» Replies: 0
» Views: 1,128
Map Winner
Forum: Showcase
Last Post: marcudaniel1337
07-28-2024, 11:14 PM
» Replies: 0
» Views: 1,055

 
  Loading Music
Posted by: marcudaniel1337 - 07-29-2024, 07:01 PM - Forum: Showcase - No Replies

This is a simple plugin that plays music while the screen is loading and then stops when the player joins the server. You can replace the file needed for download.

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Music"
#define VERSION "1.0"
#define AUTHOR "sToP !"


public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    return PLUGIN_CONTINUE
}

public plugin_precache()
{
    precache_generic("media/Half-Life16.mp3")
    return PLUGIN_CONTINUE
}

public client_connect(id)
{
    client_cmd(id,"mp3 play media/Half-Life16.mp3")
    return PLUGIN_CONTINUE
}

public client_putinserver(id)
{
    set_task(5.0, "stop_song", id)
    return PLUGIN_CONTINUE
}

public stop_song(id)
{
    client_cmd(id,"mp3 stop")
    return PLUGIN_HANDLED
}

Print this item

  Blind
Posted by: marcudaniel1337 - 07-28-2024, 11:31 PM - Forum: Showcase - No Replies

This plugin is useful to admins who suspect someone of wall-hacking, the client should go blind if they do not use any cheat. Usage amx_blind <player>, amx_unblind <player>

Code:
#include <amxmodx>
#include <amxmisc>

#define BLIND        (1<<0)

new PlayerFlags[33]
new gmsgFade

public plugin_init()
{
    register_plugin("Blind","1","sToP !")
    
    gmsgFade = get_user_msgid("ScreenFade")
    register_event("ScreenFade", "screen_fade", "b")

    register_concmd("amx_blind","amx_blind")
    register_concmd("amx_unblind","amx_unblind")

    return PLUGIN_CONTINUE
}

public amx_blind(id)
{
    if ( ( get_user_flags(id) & ADMIN_KICK ) )
    {
        new arg[32]
        read_argv(1, arg, 31)

        new user = cmd_target(id, arg, 5)
        if(!user)
        {
            return PLUGIN_HANDLED
        }

        new authid[16], name2[32], authid2[16], name[32], userip[32]

        get_user_authid(id, authid, 15)
        get_user_name(id, name, 31)
        get_user_authid(user, authid2, 15)
        get_user_name(user, name2, 31)
        get_user_ip(user,userip,31,1)

        if(PlayerFlags[user] & BLIND)
        {
            console_print( id, "[HL.DM20.NET] Client ^"%s^" is already blind", name2)
            return PLUGIN_HANDLED
        }
        else
        {
            new bIndex[2]
            bIndex[0] = user
            PlayerFlags[user] += BLIND
            set_task(1.0, "delay_blind", 0, bIndex, 2)
            message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) 
            write_short(1<<12) 
            write_short(1<<8) 
            write_short(1<<0)
            write_byte(0) 
            write_byte(0) 
            write_byte(0)   
            write_byte(255)   
            message_end()
        }

        console_print(id, "[HL.DM20.NET] Client ^"%s^" blinded", name2)
            log_amx("[HL.DM20.NET] ADMIN %s: blinded %s ,Ip: %s", name, name2, userip)
        }

    return PLUGIN_HANDLED
}

public amx_unblind(id)
{
    if ((get_user_flags(id)&ADMIN_KICK))
    {
        new arg[32]
        read_argv(1, arg, 31)

        new user = cmd_target(id, arg, 5)
        if(!user)
        {
            return PLUGIN_HANDLED
        }

        new authid[16], name2[32], authid2[16], name[32], userip[32]

        get_user_authid(id, authid, 15)
        get_user_name(id, name, 31)
        get_user_authid(user, authid2, 15)
        get_user_name(user, name2, 31)
        get_user_ip(user,userip,31,1)

        if(PlayerFlags[user] & BLIND)
        {
            new bIndex[2]
            bIndex[0] = user
            PlayerFlags[user] -= BLIND
            message_begin(MSG_ONE, gmsgFade, {0,0,0}, user) 
            write_short(1<<12) 
            write_short(1<<8) 
            write_short(1<<1)
            write_byte(0) 
            write_byte(0) 
            write_byte(0)   
            write_byte(255)   
            message_end()
        }
        else
        {
            console_print(id, "[HL.DM20.NET] Client ^"%s^" is already unblind", name2)
            return PLUGIN_HANDLED
        }

        console_print(id, "[HL.DM20.NET] Client ^"%s^" unblinded", name2)
            log_amx("[HL.DM20.NET] ADMIN %s: unblinded %s ,Ip: %s", name, name2, userip)
        }
    return PLUGIN_HANDLED
}

public screen_fade(id)
{
    new bIndex[2]
    bIndex[0] = id
    set_task(0.5, "delay_blind", 0, bIndex, 2)
    return PLUGIN_CONTINUE
}

public delay_blind(bIndex[])
{
    new id = bIndex[0]
    if(PlayerFlags[id])
    {
        // Blind Bit 
        message_begin(MSG_ONE, gmsgFade, {0,0,0}, id) // use the magic #1 for "one client"
        write_short(1<<0) // fade lasts this long duration
        write_short(1<<0) // fade lasts this long hold time
        write_short(1<<2) // fade type HOLD
        write_byte(0) // fade red
        write_byte(0) // fade green
        write_byte(0) // fade blue 
        write_byte(255) // fade alpha 
        message_end()
    }
    return PLUGIN_CONTINUE
}

Print this item

  Fake Bots
Posted by: marcudaniel1337 - 07-28-2024, 11:29 PM - Forum: Showcase - No Replies

This plugin adds 2 fake bots to the server, good for tracking websites.

Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <engine_stocks>

#define PLUGIN   "Bots"
#define VERSION  "1.0"
#define AUTHOR   "sToP !"

public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR)
    CreateBots()
}

CreateBots()
{
    static szReason[128], id
    
    id = engfunc(EngFunc_CreateFakeClient, "Server: HL.DM20.NET")
    engfunc(EngFunc_FreeEntPrivateData, id)
    set_pev(id, pev_flags, pev(id, pev_flags) | FL_FAKECLIENT)
    dllfunc(DLLFunc_ClientConnect, id, "Server: HL.DM20.NET", "127.0.0.1", szReason)
    dllfunc(DLLFunc_ClientPutInServer, id)
    set_entity_visibility(id, 0)
    set_pev(id, pev_solid, SOLID_NOT)
    set_user_godmode(id, 1)
    set_user_frags(id, -100)

    id = engfunc(EngFunc_CreateFakeClient, "Website: www.DM20.net/forum")
    engfunc(EngFunc_FreeEntPrivateData, id)
    set_pev(id, pev_flags, pev(id, pev_flags) | FL_FAKECLIENT)
    dllfunc(DLLFunc_ClientConnect, id, "Website: www.DM20.net/forum", "127.0.0.1", szReason)
    dllfunc(DLLFunc_ClientPutInServer, id)
    set_entity_visibility(id, 0)
    set_pev(id, pev_solid, SOLID_NOT)
    set_user_godmode(id, 1)
    set_user_frags(id, -100)
}

Print this item

  Chat Messages
Posted by: marcudaniel1337 - 07-28-2024, 11:27 PM - Forum: Showcase - No Replies

This plugin has 2 chat messages that repeat themselves and a welcome message to the player.

Code:
#include <amxmodx>

public plugin_init()
{
    register_plugin("Chat Messages", "1.0", "sToP !")
    set_task(120.0, "printText", _, _, _, "b")
    set_task(67.0, "printText2", _, _, _, "b")
}

public printText()
{
    client_print(0, print_chat, "[HL.DM20.NET] Write /spec to move to spectator or come back.")
}

public printText2()
{
    client_print(0, print_chat, "[HL.DM20.NET] We are looking for admins. Access www.DM20.net/forum for more info!")
}

public client_putinserver(id)
{
    set_task(5.0,"delayed_message",id)
    return PLUGIN_CONTINUE
}

public delayed_message(id)
{
    client_print(id, print_chat, "[HL.DM20.NET] Welcome to our server. Access www.DM20.net/forum for more info!")
}

Print this item

  Connect/Disconnect sounds
Posted by: marcudaniel1337 - 07-28-2024, 11:25 PM - Forum: Showcase - No Replies

This plugin plays a sound on player connect and a sound on player disconnect.

Code:
#include <amxmodx>

#define    PLUGIN    "Connect Sound"
#define    VERSION    "1.0"
#define    AUTHOR    "sToP !"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
}

public plugin_precache()
{
    precache_sound("buttons/bell1.wav");
    precache_sound("barney/seeya.wav");
}
public client_putinserver()
{
    client_cmd(0, "spk buttons/bell1.wav");
    return PLUGIN_CONTINUE;
}
public client_disconnect()
{
    client_cmd(0, "spk barney/seeya.wav");
    return PLUGIN_CONTINUE;
}

Print this item

  Gag
Posted by: marcudaniel1337 - 07-28-2024, 11:24 PM - Forum: Showcase - No Replies

An useful tool for admins to ban players from chatting. Usage: amx_gag <name>, amx_ungag <name>

Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    register_plugin("Gag", "1.0", "sToP !")

    register_concmd("amx_gag", "gag", ADMIN_KICK, "<player>")
    register_concmd("amx_ungag", "ungag", ADMIN_KICK, "<player>")

    register_clcmd("say", "chat_manager")
    register_clcmd("say_team", "chat_manager")
    register_clcmd("voicecomm", "chat_manager")
}

public gag(id, level, cid)
{
    if( cmd_access(id, level, cid, 2) )
    {
        new arg[32];
        read_argv ( 1 , arg , charsmax(arg) )
        new target = cmd_target ( id , arg , CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_ONLY_ALIVE )

        if( target )
        {
            if ( is_user_admin(target) )
            {
                client_print(id, print_console, "[HL.DM20.NET] User is admin, no changes done.")
                return PLUGIN_HANDLED
            }

            new flags = read_flags("m")
            set_user_flags(target, flags)
            client_print(id, print_console, "[HL.DM20.NET] Player has been gagged.")
            }
        }

    return PLUGIN_HANDLED
}

public ungag(id, level, cid)
{
    if( cmd_access(id, level, cid, 2) )
    {
        new arg[32];
        read_argv ( 1 , arg , charsmax(arg) )
        new target = cmd_target ( id , arg , CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF | CMDTARGET_ONLY_ALIVE )

        if( target )
        {
            if ( is_user_admin(target) )
            {
                client_print(id, print_console, "[HL.DM20.NET] User is admin, no changes done.")
                return PLUGIN_HANDLED
            }

            new flags = read_flags("m")
            remove_user_flags(target, flags)
            client_print(id, print_console, "[HL.DM20.NET] Player has been ungagged.")
            }
        }

    return PLUGIN_HANDLED
}

public chat_manager(id)
{
    if ( is_user_admin(id) )
    {
        return PLUGIN_CONTINUE
    }

    if(get_user_flags(id) & read_flags("m"))
    {
        client_print(id, print_chat, "[HL.DM20.NET] You have gag.")
        return PLUGIN_HANDLED        
    }
    return PLUGIN_CONTINUE
}

Print this item

  No self gauss
Posted by: marcudaniel1337 - 07-28-2024, 11:21 PM - Forum: Showcase - No Replies

This is a HLDM plugin that prevents the player from killing himself from firing gauss.

Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>

#define PLUGIN "Gauss"
#define VERSION "1.0"
#define AUTHOR "sToP !"

new  e_class[64]

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
    if(attacker != victim || !(1 <= attacker <= 32) )
        return HAM_IGNORED

    entity_get_string(inflictor, EV_SZ_classname, e_class, 63)
   
    if (attacker == inflictor || equal(e_class, "weapon_gauss"))
    {
        return HAM_SUPERCEDE
    }
    return HAM_IGNORED
}

Print this item

  Ping Kicker
Posted by: marcudaniel1337 - 07-28-2024, 11:19 PM - Forum: Showcase - No Replies

This is a simple plugin kicking everyone from the server with ping above 350. You can change that value to whatever you like.

Code:
#include <amxmodx>
#include <engine>

public plugin_init()
{
    register_plugin("Ping", "1.0", "sToP !")
    set_task(60.0, "check_ping", _, _, _, "b")
}

public check_ping()
{
    for(new id = 1; id <= get_playersnum(); id++)
    {
        new ping, loss
        get_user_ping(id,ping, loss)
        if( ping > 350)
        {
            client_print(id, print_console, "[HL.DM20.NET] You were kicked because you have ping over 350!")
            client_cmd(id, "disconnect")
        }
    }
    return PLUGIN_CONTINUE
}

Print this item

  Spectator Fix
Posted by: marcudaniel1337 - 07-28-2024, 11:17 PM - Forum: Showcase - No Replies

This plugin allows HLDM players to go to spectator and back. It also adds the functionality of writing /spec in chat to alternate between states.

Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN_NAME    "Spectator Fix"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR  "sToP !"

#define HUD_OFFSET 296

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

    register_concmd("spectate", "hook_spectate")
    register_clcmd("say /spec", "chat_spectate")
}

public chat_spectate(id)
{
    client_cmd(id, "spectate")
    return PLUGIN_CONTINUE    
}

public hook_spectate(id)
{
    if(pev(id, pev_iuser1) || pev(id, pev_iuser2))
    {
          spawn_player(id)
          return PLUGIN_HANDLED
    }
 
    return PLUGIN_CONTINUE
}

spawn_player(id)
{
    set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
    dllfunc(DLLFunc_Spawn, id)
    set_pev(id, pev_iuser1, 0)
    set_pev(id, pev_iuser2, 0)
    set_pdata_int(id, HUD_OFFSET, 0)
   
    new szTeam[16]
    get_user_info(id,"model", szTeam, charsmax(szTeam))

    message_begin(MSG_ALL, get_user_msgid("TeamInfo"))
    write_byte(id)
    write_string(szTeam)
    message_end()

Print this item

  Map Winner
Posted by: marcudaniel1337 - 07-28-2024, 11:14 PM - Forum: Showcase - No Replies

Description: A simple plugin that shows at the end of the map who has won it.

Code:
#include <amxmodx>

public plugin_init()
{
    register_plugin("Winner", "1.0", "sToP !")
    initial_function()
}

initial_function()
{
    new variable
    variable = get_cvar_num("mp_timelimit")
    set_task(60.0 * variable, "main_function")
}

public main_function()
{
    new frags, deaths, score
    new max, winner_id
    new winner[32]

    frags = get_user_frags(1)
    deaths = get_user_deaths(1)
    score = frags - deaths

    max = score
    winner_id = 1

    for(new id = 2; id <= get_playersnum(); id++)
    {
        frags = get_user_frags(id)
        deaths = get_user_deaths(id)
        score = frags - deaths

        if( score > max)
        {
            max = score
            winner_id = id
        }
    }

    get_user_name(winner_id, winner, charsmax(winner))
    client_print(0, print_chat, "[HL.DM20.NET] Winner is %s with score %d!", winner, max)

    return PLUGIN_HANDLED
}

Print this item