Raised This Month: $51 Target: $400
 12% 

[L4D2] Zed Time with Highlight Kill System v1.6.1 [13-January-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-03-2022 , 07:14   Re: [L4D2] Zed Time with Highlight Kill System v1.3 [3-March-2022]
Reply With Quote #21

update
Quote:
PHP Code:
// admin flag to acces ZedTime commands f:slay empty:allow everyone
zed_time_access "f"

// use lucky mode instead threshold mode, also effect by threshold requirement
zed_time_lucky "0"

// bot weight ratio, 0.5:bot cause half threshold 0:bot cant trigger
zed_time_threshold_bot "0.5" 
Commands
  • sm_zedtime // Trigger ZedTime manually. Usage: sm_zedtime [duration] [timescale]
  • sm_zedstop //stop the zedtime manually

changelog
  • v1.3 new features:
    lucky mode instead threshold mode,
    commands 'sm_zedtime [duration] [timescale]', 'sm_zedstop' to trigger manually and permission configuable,
    remove ConVar threshold_survivor_death and add threshold_bot to instead, fix trigger multiple zedtime cause multi sound effects,
    rewrite some code and less performance usage; 3-March-2022
not so many test, if encounted problem please report
im depression recent, may not coding anymore........
__________________

Last edited by NoroHime; 03-03-2022 at 07:27.
NoroHime is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-03-2022 , 14:00   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #22

update, make ZedTime no more anoying, but boost happen on next action

PHP Code:
// which actions boost under ZedTime
// 1=Firing 2=Deploying 4=Reloading 8=MeleeSwinging 16=Throwing -1=All.
// add numbers together you want
zed_time_boost_actions "-1"

// how fast boost the actions under ZedTime
// -1:auto scaling by timescale 2:doubling speed 0:disable
zed_time_boost_speed "-1" 
changelog
__________________

Last edited by NoroHime; 03-03-2022 at 14:01.
NoroHime is offline
Maur0
Senior Member
Join Date: Aug 2020
Old 03-04-2022 , 14:32   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #23

Tested and pretty good now. Thank you very much for changing the death method of the Tank and the Witch. Now I can kill them with the kill command without triggering zedtime. And thanks for adding the boots style, it's like KF2
Maur0 is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-05-2022 , 06:44   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #24

this snippets for allow player press Ctrl+E buy zedtime from shop
example is [L4D2] Shop by pan0s
PHP Code:
#define PLUGIN_NAME "Costly_ZedTime"

#pragma newdecls required

#include <sourcemod>

#define MAX_MESSAGE_LENGTH 250

native bool BuyItem(int clientint points, const char item[32]);
native int ZedTime(float durationfloat timescale);

public 
Plugin myinfo = {
    
name "Costly ZedTime",
    
author "NoroHime",
    
description "Ctrl+E to buy ZedTime",
    
version "1.0",
};

bool hasTranslations false;
int AlivedHumanSurvivor 0;

enum {
    
CENTER =     (<< 0),
    
CHAT =        (<< 1),
    
HINT=         (<< 3)
}

public 
void OnPluginStart() {

    
HookEvent("player_team"OnHumanChangedEventHookMode_PostNoCopy);
    
HookEvent("player_bot_replace"OnHumanChangedEventHookMode_PostNoCopy);
    
HookEvent("bot_player_replace"OnHumanChangedEventHookMode_PostNoCopy);

    
char path[PLATFORM_MAX_PATH];
    
BuildPath(Path_SMpathPLATFORM_MAX_PATH"translations/" ... PLUGIN_NAME ... ".phrases.txt");
    
hasTranslations FileExists(path);

    if (
hasTranslations)
        
LoadTranslations(PLUGIN_NAME ... ".phrases");
}

public 
void OnPlayerRunCmdPost(int clientint buttonsint impulse, const float vel[3], const float angles[3], int weaponint subtypeint cmdnumint tickcountint seed, const int mouse[2]) {

    static 
int buttons_last[MAXPLAYERS 1];

    
bool pressed_use buttons IN_USE && !(buttons_last[client] & IN_USE);

    if (
pressed_use && (buttons IN_DUCK) && isAliveHumanSurvivor(client))

        if (
BuyItem(clientAlivedHumanSurvivor"ZedTime")) {
            
ZedTime(1.00.0);
            
AnnounceAll(CHATclient"%t""Active ZedTime"client);
        }

    
buttons_last[client] = buttons;
}

void Announce(int clientint announce_type, const char[] formatany ...) {
    if (!
hasTranslations) return;

    static 
char buffer[254];

    
SetGlobalTransTarget(client);
    
VFormat(buffersizeof(buffer), format4);
    
ReplaceColor(buffersizeof(buffer));

    if (
announce_type CHAT)
        
PrintToChat(client"%s"buffer);

    if (
announce_type HINT)
        
PrintHintText(client"%s"buffer);

    if (
announce_type CENTER)
        
PrintCenterText(client"%s"buffer);
}

void AnnounceAll(int announce_typeint excludedClient, const char[] formatany ...) {
    if (!
hasTranslations) return;

    
char message[MAX_MESSAGE_LENGTH];
    for (
int client 1client <= MaxClientsclient++) {
        if (
isHumanClient(client) && excludedClient != client) {
            
SetGlobalTransTarget(client);
            
VFormat(messagesizeof(message), format4);
            
Announce(clientannounce_typemessage);
        }
    }
}

public 
void OnHumanChanged(Event event, const char[] namebool dontBroadcast) {

    
int alives 0;
    for (
int client 1client <= MaxClientsclient++)
        if (
isAliveHumanSurvivor(client))
            
alives++;

    
AlivedHumanSurvivor alives;
}

stock void ReplaceColor(char[] messageint maxLen) {

    
ReplaceString(messagemaxLen"{white}""\x01"false);
    
ReplaceString(messagemaxLen"{default}""\x01"false);
    
ReplaceString(messagemaxLen"{cyan}""\x03"false);
    
ReplaceString(messagemaxLen"{lightgreen}""\x03"false);
    
ReplaceString(messagemaxLen"{orange}""\x04"false);
    
ReplaceString(messagemaxLen"{olive}""\x04"false);
    
ReplaceString(messagemaxLen"{green}""\x05"false);
}

stock bool isAliveHumanSurvivor(int client){
    return 
isHumanClient(client) && IsPlayerAlive(client) && GetClientTeam(client) == 2;
}

stock bool isHumanClient(int client) {
    return 
isClient(client) && !IsFakeClient(client);
}

stock bool isClient(int client) {
    return 
isClientIndex(client) && IsValidEntity(client) && IsClientInGame(client);
}

stock bool isClientIndex(int client) {
    return (
<= client <= MaxClients);

to make example work, you need add this code to make shop support external buy

PHP Code:
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)  {
    
CreateNative("BuyItem"ExternalBuyItem);
    return 
APLRes_Success
}

public 
int ExternalBuyItem(Handle pluginint numParams) {
    
int client GetNativeCell(1),
        
points GetNativeCell(2);

    
int size;
    
GetNativeStringLength(3size);
    
char[] item = new char[size 1];
    
GetNativeString(3itemsize 1);

    if (
IsValidClient(client) > && points 0)
        return 
Checkout(clientpointsitemtrue);

    return 
false;

you may add "ZedTime" to shop translations phrases file
Attached Files
File Type: txt Costly_ZedTime.phrases.txt (215 Bytes, 66 views)
File Type: sp Get Plugin or Get Source (Costly_ZedTime.sp - 120 views - 3.6 KB)
__________________

Last edited by NoroHime; 03-05-2022 at 06:48.
NoroHime is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 04-22-2022 , 21:08   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #25

I have been using it and I love it, especially when it activates in the middle of explosions. It is amazing.
I have a question.

"to trigger zed time you need kill many zombie on short time, 4 means you need to kill 4 worth value of zombies"

How long is that short time? Can it be adjusted with some cvar or by editing the source code?
Toranks is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 04-23-2022 , 01:10   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #26

Quote:
Originally Posted by Toranks View Post
I have been using it and I love it, especially when it activates in the middle of explosions. It is amazing.
I have a question.

"to trigger zed time you need kill many zombie on short time, 4 means you need to kill 4 worth value of zombies"

How long is that short time? Can it be adjusted with some cvar or by editing the source code?
this kinda easy, the "short time" control by
zed_time_threshold_cooldown 0.3
enlarge it make trigger easier
you can also use zed_time_lucky 1
even you doesnt reached threshold also trigger by lukcy
__________________

Last edited by NoroHime; 04-23-2022 at 01:11.
NoroHime is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 04-23-2022 , 02:50   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #27

Quote:
Originally Posted by NoroHime View Post
this kinda easy, the "short time" control by
zed_time_threshold_cooldown 0.3
enlarge it make trigger easier
you can also use zed_time_lucky 1
even you doesnt reached threshold also trigger by lukcy
Ah, so I misunderstood the zed_time_threshold_cooldown cvar. I thought that was the minimum time between two consecutive zed times. Thank you!
Toranks is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 04-25-2022 , 02:36   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #28

I have seen that like this other plugin, if a stage reset is voted with a plugin that allows the stage to be reset instead of entire campaign, in the middle of zed time, it stays on zed time permanently. Although in this case it has an easy solution. !sm_zedstop doesn't work, I have to use !sm_zedtime and then !sm_zedstop to restore normal state
https://forums.alliedmods.net/showpo...2&postcount=29

Last edited by Toranks; 04-25-2022 at 02:37.
Toranks is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 04-25-2022 , 03:38   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #29

yes i noticed this situation, time controller entity has been removed from server and game cant remember 1.0x speed, i havent good way to solute it so these commands appear, you just have to use "!zedtime 0"
__________________

Last edited by NoroHime; 04-25-2022 at 03:40.
NoroHime is offline
sonic155
Senior Member
Join Date: Mar 2019
Old 04-27-2022 , 04:55   Re: [L4D2] Zed Time with Highlight Kill System v1.4 [4-March-2022]
Reply With Quote #30

killing commons with frag/explosives ammo will count as headshots triggering zed time very easy o.o
sonic155 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:17.


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