AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie:Reloaded (https://forums.alliedmods.net/forumdisplay.php?f=132)
-   -   [ZR] Help, sometimes I spawn as zombie with human class? (https://forums.alliedmods.net/showthread.php?t=328679)

Focus Nation 11-20-2020 20:22

[ZR] Help, sometimes I spawn as zombie with human class?
 
It seems to happen from time to time I spawn as a zombie with human class it's random and I don't wan't to have this when I open a zombie server it seems unfair only way I fix it is by changing the class to a zombie class why?

Focus Nation 11-23-2020 08:17

Re: [ZR] Help, sometimes I spawn as zombie with human class?
 
I applied this:
https://forums.alliedmods.net/showpo...7&postcount=58

And that makes so I spawn as human skin with zombie hp which is better but any way to completely fix this issue it's been so many years?
(that post is from 2012)

Focus Nation 11-23-2020 10:04

Re: [ZR] Help, sometimes I spawn as zombie with human class?
 
https://forums.alliedmods.net/showpo...&postcount=130
I used this and it seems to do the trick except it changes you everyspawn to a new zombie skin, is there any other way to put it to ANY default instead

Oylsister 11-28-2020 09:27

Re: [ZR] Help, sometimes I spawn as zombie with human class?
 
Quote:

Originally Posted by Focus Nation (Post 2726015)
https://forums.alliedmods.net/showpo...&postcount=130
I used this and it seems to do the trick except it changes you everyspawn to a new zombie skin, is there any other way to put it to ANY default instead

PHP Code:

decl String:name[64], String:enable[32], String:defaults[32];
new 
Items[Classes];

do
{
    
KvGetString(kv"default"defaults32);
    
KvGetString(kv"enabled"enable32);
    if(
StrEqual(enable"yes") && StrEqual(defaults"yes") && KvGetNum(kv"team") == && KvGetNum(kv"flags") == 0// check if is a enabled zombie class and no admin class
    
{
        
KvGetString(kv"name"namesizeof(name));
        
Items[Index] = ZR_GetClassByName(name);
        
Items[health] = KvGetNum(kv"health"5000);
        
KvGetString(kv"model_path"Items[model], 128);
        
PushArrayArray(array_classesItems[0]); // save all info in the array
    
}
            
} while (
KvGotoNextKey(kv)); 

added some part of the code, try it for zr_classfix.sp

Focus Nation 11-28-2020 18:51

Re: [ZR] Help, sometimes I spawn as zombie with human class?
 
Quote:

Originally Posted by Oylsister (Post 2726522)
PHP Code:

decl String:name[64], String:enable[32], String:defaults[32];
new 
Items[Classes];

do
{
    
KvGetString(kv"default"defaults32);
    
KvGetString(kv"enabled"enable32);
    if(
StrEqual(enable"yes") && StrEqual(defaults"yes") && KvGetNum(kv"team") == && KvGetNum(kv"flags") == 0// check if is a enabled zombie class and no admin class
    
{
        
KvGetString(kv"name"namesizeof(name));
        
Items[Index] = ZR_GetClassByName(name);
        
Items[health] = KvGetNum(kv"health"5000);
        
KvGetString(kv"model_path"Items[model], 128);
        
PushArrayArray(array_classesItems[0]); // save all info in the array
    
}
            
} while (
KvGotoNextKey(kv)); 

added some part of the code, try it for zr_classfix.sp

Thanks for trying, seems like I just get errors why I try to compile with this.

Heres some of the errors:
error 021: symbol already defined: "Items"
error 021: symbol already defined: "KvGetString"
error 054: unmatched closing brace ("}")

I guess I can't have VIP zombie classes for a while now untill this gets fixed

Oylsister 11-28-2020 20:29

Re: [ZR] Help, sometimes I spawn as zombie with human class?
 
1 Attachment(s)
my mistake, try this instead

Focus Nation 11-28-2020 21:22

Re: [ZR] Help, sometimes I spawn as zombie with human class?
 
Almost haha it had void in stead of int but I changed then I was able to compile :P I will test then edit once I know if it works or not.

\scripting\zr_classfix.sp(123) : error 180: function return type differs from prototype. expected 'int', but got 'void'

EDIT: Doing this will make last person who gets turnt in to a zombie a human class for zombie the next round. So this doesn't work.


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

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