AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Removing kill from hud (https://forums.alliedmods.net/showthread.php?t=17994)

XunTric 09-13-2005 11:42

Removing kill from hud
 
How would I go on removing the kills of a person from the kill list hud thing in ur corner? :P

nightscreem 09-13-2005 11:54

i think it's something like this
Code:
set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET) your code set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT)

Zor 09-13-2005 13:22

In your server.cfg place the following:
mp_deathmsg 0

Then ensure that you dont have it anywhere else. This will turn off the death message in the top right hand corner of the screen. I do believe this is what you are looking for yes?

Cheers!

XunTric 09-13-2005 14:56

I was looking for only removing one persons kills from the hud.

I see that nightscreems way doesnt have a index, so it cant be for one person only.

Any other ideas?

Zor 09-13-2005 15:43

Yup, what I do is the following:

Code:

public plugin_init()
{
        // Register the death message catch
        register_message(get_user_msgid("DeathMsg"), "death_message")
}

public death_message(id)
{
        new killer = get_msg_arg_int(1)
        new victim = get_msg_arg_int(2)
        new weapon = get_msg_arg_int(3)

        if(wish to block)
                return PLUGIN_HANDLED

        return PLUGIN_CONTINUE
}


XunTric 09-14-2005 09:25

Thanks ill try that :D

Now all I need is to remove the user from the stats list and I got a kick ass plugin. :P
(If thats possible)

-----------------

Hmmm why aint this working?
Code:
public remove_deathmsg(id) {     if(g_Spectator[id] == true) {                 return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }

Charr 09-14-2005 14:33

before the end of the plugin you have to have:
Code:

set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET)
Then after you block the 1 person's death msg, put:
Code:

set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT)

XunTric 09-14-2005 14:49

I found a way to do it.
But I cant see why this aint working?
I cant see the print with "amx_spectate_debug" on..
Code:
public plugin_init() {     register_event("DeathMsg", "DeathMsg", "be") } public DeathMsg(id) {     if(g_Spectator[id] == false) {         return PLUGIN_CONTINUE     }     if(get_cvar_num("amx_spectate_debug") == 1) {         client_print(0, print_chat, "[Spectate] DeathMsq function succesfull!")     }     //Tasks done twise to avoid bug..     set_task(0.5, "spawnplayer", id)     set_task(0.7, "spawnplayer", id)     set_task(1.0, "spawnweapons", id)     set_task(1.2, "spawnweapons", id)     set_task(1.5, "spawninvinsible", id)     return PLUGIN_CONTINUE }

If you wonder what the fuck this plugin is: :P
You use amx_spectate on someone.
Then they get spawned as spectator,
get some weapons, endless ammo,
you are invinsible, and nobody can see your kills.
But you can still die.
So its a "Secret Spectator Mode" plugin... :D

Zor 09-14-2005 15:23

I already had this built...works fine. Called Cloak, it just made you invisible. Problem was that ppl on your team could see the icon above your head. So not good. Anyway here:

Code:

///////////////////////////////////////////////////////////////////////////////////////
//
//        AMX Mod (X)
//
//        Developed by:
//        The Amxmodx DoD Community
//        |BW|.Zor Editor ([email protected])
//        http://www.dodcommunity.net
//
//        This program is free software; you can redistribute it and/or modify it
//        under the terms of the GNU General Public License as published by the
//        Free Software Foundation; either version 2 of the License, or (at
//        your option) any later version.
//
//        This program is distributed in the hope that it will be useful, but
//        WITHOUT ANY WARRANTY; without even the implied warranty of
//        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//        General Public License for more details.
//
//        You should have received a copy of the GNU General Public License
//        along with this program; if not, write to the Free Software Foundation,
//        Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//        In addition, as a special exception, the author gives permission to
//        link the code of this program with the Half-Life Game Engine ("HL
//        Engine") and Modified Game Libraries ("MODs") developed by Valve,
//        L.L.C ("Valve"). You must obey the GNU General Public License in all
//        respects for all of the code used other than the HL Engine and MODs
//        from Valve. If you modify this file, you may extend this exception
//        to your version of the file, but you are not obligated to do so. If
//        you do not wish to do so, delete this exception statement from your
//        version.
//
//        Name:                Aim Bot Detector
//        Author:                |BW|.Zor
//        Description:        This Plugin will help to detect aimboters
//
//        v0.1        - Be!
//       
///////////////////////////////////////////////////////////////////////////////////////
#include <amxmodx>
#include <fun>
#include <amxmisc>

//////////////////////////////////////////////
// Version Control
//
new AUTH[] = "Amxmodx DoD Communtiy"
new PLUGIN_NAME[] = "Aim Bot Detector"
new VERSION[] = "0.1d"
new ACCESS = ADMIN_LEVEL_A
//
//////////////////////////////////////////////

//////////////////////////////////////////////
// Globals
//
new bool:cloaked[32] = false
//
//////////////////////////////////////////////

//////////////////////////////////////////////
// Initializations of the Plugin
public plugin_init()
{
        // Register this plugin
        register_plugin(PLUGIN_NAME, VERSION, AUTH)

        register_concmd("amx_cloak", "cloak", ACCESS, "Detects Aim Bot'ers.")
        register_concmd("amx_uncloak", "cloak", ACCESS, "Stops Detection of Aim Bot'ers.")
}

//////////////////////////////////////////////
// Called prior to user disconnect
public client_disconnect(id)
{
        cloaked[id] = false
}

//////////////////////////////////////////////
// Will cloak or uncloak a person
public cloak(id, level, cid)
{
        if(!cmd_access(id, level, cid, 1))
                return PLUGIN_HANDLED

        new cmd[32]
        read_argv(0, cmd, 31)

        client_print(id, print_console, "Starting Cloaking!")

        // Cloak the caller
        if(equal(cmd, "amx_cloak"))
        {
                cloaked[id] = true
                if(is_user_alive(id))
                {
                        set_user_footsteps(id, 1)
                        set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
                }

                client_print(id, print_console, "You are being Cloaked!")
        }

        // Un-Cloak the caller
        else
        {
                cloaked[id] = false
                if(is_user_alive(id))
                {
                        set_user_footsteps(id, 0)
                        set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
                }

                client_print(id, print_console, "You are being Un-Cloaked!")
        }

        return PLUGIN_HANDLED
}


XunTric 09-14-2005 15:42

Hmm ok, but I want to make my own.
What about my DeathMsg event?


All times are GMT -4. The time now is 23:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.