Slay/kick Zombies when they dont attack/move

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Slay/kick Zombies when they dont attack/move

Мнение от Infamous2018 » 24 Юни 2020, 20:04

I have the following wish: Since I have a zombie server and have the problem that some players do not want to attack as a zombie, they simply wait until they are counter terrorists again after two rounds. The following question / request:

Can anyone create a plugin that zombies are automatically slayed after 5 seconds if they don't attack and move? Something like Walkguard. And that they get a message such as: "Please attack as a zombie". And the best thing would be that the zombies that ignore this are simply kicked off the server after the 5x (5 times slay in round) slay. Would be mega top if someone can.

Please for 1.8.3 (Only this works for my Swarm Mod)

Аватар
JackEyedJones
Извън линия
Потребител
Потребител
Мнения: 399
Регистриран на: 10 Сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 69 пъти
Обратна връзка:

Slay/kick Zombies when they dont attack/move

Мнение от JackEyedJones » 24 Юни 2020, 21:00

Well its up to someone to do it but...
viewtopic.php?f=32&t=6436
This plugin can be edited. When you press X times E aiming towards someone who has the bomb, it transfers the bomb to you. Thats how its working.
The idea i have is, if you are human and you slap the zombie thats not chasing X times, this zombie gets slayed. Couldnt come up with something else =D

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Slay/kick Zombies when they dont attack/move

Мнение от Infamous2018 » 25 Юни 2020, 19:30

yes i seen this plugin but this dont work then for my server. x.x The players should not get privilges to aim them and slap them then...

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Slay/kick Zombies when they dont attack/move

Мнение от Infamous2018 » 26 Юни 2020, 19:31

so no one?

Аватар
JackEyedJones
Извън линия
Потребител
Потребител
Мнения: 399
Регистриран на: 10 Сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 69 пъти
Обратна връзка:

Slay/kick Zombies when they dont attack/move

Мнение от JackEyedJones » 26 Юни 2020, 23:10

Well, my idea is shadowing your waiting time. :gamer1: If you expect someone to do it out of nowhere then they could close this thread. By now the idea suggested is the best, of course in my vision. Not as author of it, but as the 1st thing that came up to me.

Attach the .inc file of this swarm mode.

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

Slay/kick Zombies when they dont attack/move

Мнение от atmax » 27 Юни 2020, 10:43

Just eddit the afk plugin to work only for zombies.. And Eddit it to kick or slay them if they don't move..
Rest in peace my friend I always will remember you! 🖤👊

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Slay/kick Zombies when they dont attack/move

Мнение от Infamous2018 » 27 Юни 2020, 14:50

mh i am noob ^^

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Slay/kick Zombies when they dont attack/move

Мнение от Infamous2018 » 12 Юли 2020, 10:27

For everyone who need those Plugin. I got anyone and its working. ANd it is for Umbrella Swarm Mod.

So here for all:

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <hamsandwich>

#pragma tabsize 0

native is_zombie(id)

#define MIN_AFK_TIME 10        // I use this incase stupid admins accidentally set mp_afktime to something silly.
#define WARNING_TIME 5        // Start warning the user this many seconds before they are about to be kicked.
#define CHECK_FREQ 5        // This is also the warning message frequency.

new g_oldangles[33][3]
new g_afktime[33]
new bool:g_spawned[33] = {true, ...}
new count[33]

public plugin_init() 
{
    register_plugin("AFK Kicker","1.0b","Cheesy Peteza") 
    register_cvar("mp_slaytime", "10")    // Slay people AFK longer than this time
    register_cvar("mp_kicknum", "5")    // Kick after x slays counted
    register_cvar("mp_afkminplayers", "3")    // Only check for AFKs when there is atleast this many players on the server
    set_task(float(CHECK_FREQ),"checkPlayers",_,_,_,"b")
    RegisterHam(Ham_Spawn,"player","playerSpawned",1)
    register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
}

public event_new_round()	arrayset(count,0,charsmax(count))

public checkPlayers() 
{
    for (new i = 1; i <= get_maxplayers(); i++) 
    {
        if (is_user_alive(i) && is_zombie(i) && !is_user_bot(i) && !is_user_hltv(i) && g_spawned[i]) 
        {
            new newangle[3]
            get_user_origin(i, newangle)

            if ( newangle[0] == g_oldangles[i][0] && newangle[1] == g_oldangles[i][1] && newangle[2] == g_oldangles[i][2] ) 
            {
                g_afktime[i] += CHECK_FREQ
                check_afktime(i)
            } 
            else 
            {
                g_oldangles[i][0] = newangle[0]
                g_oldangles[i][1] = newangle[1]
                g_oldangles[i][2] = newangle[2]
                g_afktime[i] = 0
            }
        }
    }
    return PLUGIN_HANDLED
}

check_afktime(id) 
{
    new numplayers = get_playersnum()
    new minplayers = get_cvar_num("mp_afkminplayers")

    if (numplayers >= minplayers) 
    {
        new maxafktime = get_cvar_num("mp_afktime")
        if (maxafktime < MIN_AFK_TIME) 
        {
            log_amx("cvar mp_afktime %i is too low. Minimum value is %i.", maxafktime, MIN_AFK_TIME)
            maxafktime = MIN_AFK_TIME
            set_cvar_num("mp_afktime", MIN_AFK_TIME)
        }

        if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) 
        {
            new timeleft = maxafktime - g_afktime[id]
            client_print(id, print_chat, "[AntiAttack] You have %i seconds to move or you will be slayed for no attack. %d chance%s left", timeleft,count[id],count[id]==1?"":"s")
        } 
        else if (g_afktime[id] > maxafktime) 
        {
            new name[33]
            get_user_name(id, name, 32)
            client_print(0, print_chat, "[AntiAttack] %s was slayed for no attack longer than %i seconds", name, maxafktime)
            log_amx("%s was slayed for no attack longer than %i seconds", name, maxafktime)
            user_silentkill(id)
	   count[id]++
	   if(count[id]>=get_cvar_num("mp_kicknum")){
		 log_amx("%s was kicked for ignoring attack as zombie longer than %i seconds", name, maxafktime+get_cvar_num("mp_kicknum"))
		server_cmd("kick #%d ^"You have been for no attack as Zombie^"",get_user_userid(id))
	   }
	   else if(count[id]==get_cvar_num("mp_kicknum")-1)	client_print(id,print_chat,"Please attack as a zombie")
        }
    }
}

public client_putinserver(id)	if(is_user_connected(id)&&!is_user_bot(id)||!is_user_hltv(id))	count[id]=0

public playerSpawned(id) 
{
	g_afktime[id] = 0
	g_spawned[id] = false
	new sid[1]
	sid[0] = id
	set_task(0.75, "delayedSpawn",_, sid, 1)    // Give the player time to drop to the floor when spawning
}
public delayedSpawn(sid[]) 
{
	get_user_origin(sid[0], g_oldangles[sid[0]])
	g_spawned[sid[0]] = true
	return PLUGIN_HANDLED
}
Thread can be closed then.

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 6 госта