Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Focus Nation
Member
Join Date: Nov 2020
Old 11-20-2020 , 20:22   [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #1

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 is offline
Focus Nation
Member
Join Date: Nov 2020
Old 11-23-2020 , 08:17   Re: [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #2

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 is offline
Focus Nation
Member
Join Date: Nov 2020
Old 11-23-2020 , 10:04   Re: [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #3

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
__________________

Focus Nation is offline
Oylsister
Senior Member
Join Date: Aug 2019
Location: KhonKaen, Thailand
Old 11-28-2020 , 09:27   Re: [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #4

Quote:
Originally Posted by Focus Nation View Post
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
__________________
Oylsister is offline
Focus Nation
Member
Join Date: Nov 2020
Old 11-28-2020 , 18:51   Re: [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #5

Quote:
Originally Posted by Oylsister View Post
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
__________________


Last edited by Focus Nation; 11-28-2020 at 19:40.
Focus Nation is offline
Oylsister
Senior Member
Join Date: Aug 2019
Location: KhonKaen, Thailand
Old 11-28-2020 , 20:29   Re: [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #6

my mistake, try this instead
Attached Files
File Type: sp Get Plugin or Get Source (zr_classfix.sp - 67 views - 3.8 KB)
__________________
Oylsister is offline
Focus Nation
Member
Join Date: Nov 2020
Old 11-28-2020 , 21:22   Re: [ZR] Help, sometimes I spawn as zombie with human class?
Reply With Quote #7

Almost haha it had void in stead of int but I changed then I was able to compile 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.
__________________


Last edited by Focus Nation; 11-28-2020 at 21:28.
Focus Nation 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 14:34.


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