Raised This Month: $37 Target: $400
 9% 

[CS:GO] ZR Hotfix set zm default class


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Anna
New Member
Join Date: Jan 2019
Old Yesterday , 13:16   [CS:GO] ZR Hotfix set zm default class
Reply With Quote #1

Hey,

I'm using ZR Hotfix plugin because players don't get zombie class when infected.
I have verified with command "zr_class_dump player XX" to debug and I have tryed to refresh with "zr_class_reload XX" but still refreshing the actual class, zombie with human class refresh human class.

The ZR Hotfix plugin only sets an amount of HP & defined skin but doesn't set all config that the class had, like knockback, jump height and all the other config linked to the class. Is it possible to have something like:

Code:
public ZR_OnClientInfected(client, attacker, bool:motherInfect, bool:respawnOverride, bool:respawn)
{
	new vida = GetClientHealth(client);
	if(vida < 300)
	{
		SetClass(client, zr_classes_default_zombie);
	}
}
I know that this code can't work but is it possible to do something like that ?

Edit: I use ZR Franug edition ; I have zero errors in the logs

Last edited by Anna; Yesterday at 13:39. Reason: add plugin info
Anna is offline
quasemago
Junior Member
Join Date: Dec 2018
Location: Brazil
Old Yesterday , 22:05   Re: [CS:GO] ZR Hotfix set zm default class
Reply With Quote #2

Yep.

PHP Code:
public ZR_OnClientInfected(clientattackerbool:motherInfectbool:respawnOverridebool:respawn)
{
    new 
classIndex ZR_GetClassByName("Zombie Class Name");
    
    if (
ZR_IsValidClassIndex(classIndex)) {
        
ClassSelected_Instant:ZR_SelectClientClass(clientclassIndextruetrue);
    }

quasemago is offline
Anna
New Member
Join Date: Jan 2019
Old Today , 17:21   Re: [CS:GO] ZR Hotfix set zm default class
Reply With Quote #3

Thanks you quasemago but it didn't work...

I have used this:

PHP Code:
public ZR_OnClientInfected(clientattackerbool:motherInfectbool:respawnOverridebool:respawn)
{
    new 
vida GetClientHealth(client);
    if(
vida 300)
    {
        
PrintToChatAll("[HOTFIX] Zombie detected with Human class ! (Health < 300)");
        
        new 
classIndex ZR_GetClassByName("Classic");
        if (
ZR_IsValidClassIndex(classIndex))
        {
            
ClassSelected_Instant:ZR_SelectClientClass(clientclassIndextruetrue);
            
PrintToChatAll("[HOTFIX] Zombie with Human Class has been modified to the zombie 'Classic' class");
        }
        else
        {
            
PrintToChatAll("[HOTFIX] Zombie 'Classic' Class is not valid");
        }
    }
    else
    {
        
PrintToChatAll("[HOTFIX] Zombie detected without any bug");    
    }

When the mother zombie spawns, it says:
[HOTFIX] Zombie detected without any bug

When the mother zombie knifes a human:
[HOTFIX] Zombie detected with Human class ! (Health < 300)
[HOTFIX] Zombie with Human Class has been modified to the zombie 'Classic' class


and when I use the command "zr_class_dump player NAME" it says he still has the "Normal Human" class.

Help me please

Last edited by Anna; Today at 17:22.
Anna is offline
Reply


Thread Tools
Display Modes

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 19:53.


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