Quote:
Originally Posted by Dmitrii.S
Hello everybody!
Only I have problem with the mod ZR?
The latest version of ZR (3.4.2 Franug edition) and SM is installed. I have a problem with classes, when a person is infected, sometimes the skin of a person remains, and he is in the zombie team, but people cant shoot at him, because he has a human skin.
I know zrlassfix should be fix this problem, but I install new version of plugin (3.1) and my server crashes every 30 minutes, then I tried to install the old version of zrclassfix (2.1), but with the old version there is another problem, skins are not saved, sometimes it are reset, vip skins are issued to players who do not have a flag for this skin.
I ask for help...
|
I don't know the reason why the server is crashed with v3.1, but to fix the problem of random players gets VIP skin without permission. I added some part for "team_default" to make it only search zombie default skin.
PHP Code:
char name[64];
char enable[32];
char class_default[32];
Classes Items;
do
{
KvGetString(kv, "enabled", enable, 32);
//Is this skins default to everyone or not
KvGetString(kv, "team_default", class_default, 32);
// Only search for a class that set team_default as yes to prevent non-vip player getting vip skins but if you set vip class as default skin too it will not work
if(StrEqual(enable, "yes") && StrEqual(class_default, "yes") && KvGetNum(kv, "team") == 0 && KvGetNum(kv, "flags") == 0) // check if is a enabled zombie class and no admin class
{
KvGetString(kv, "name", name, sizeof(name));
Items.Index = ZR_GetClassByName(name);
Items.health = KvGetNum(kv, "health", 5000);
KvGetString(kv, "model_path", Items.model, 128);
PushArrayArray(array_classes, Items); // save all info in the array
}
} while (KvGotoNextKey(kv));
I edited this based on 2.1. however, the new syntax is much copying from 3.1
Ps. with this method, the player might have to re-choose the class every time when the server restart or rejoin the server.