Hey sorry that i ask here.
I edit the HumanitySystem Plugin from Dylan because it dont add People to the Groups. At beginning the Group create didn't work to.
i have the following code and dont finde the error/bug.
Please help me :)
I edit the HumanitySystem Plugin from Dylan because it dont add People to the Groups. At beginning the Group create didn't work to.
i have the following code and dont finde the error/bug.
if(playerData.Humanity <= -2500){
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "hero")) == true) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "hero");
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "neutral")) == true) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "neutral");
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "bandit")) == true || playerData.Rank == 2) return "bandit";
BetterChat?.Call("API_AddUserToGroup", player.UserIDString, "bandit");
humanityData.playerH[player.userID].Rank = 2;
SendReply(player, lang.GetMessage("NowA", this), "bandit");
}
else if(playerData.Humanity >= 2500){
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "bandit"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "bandit");
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "neutral"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "neutral");
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "hero")) || playerData.Rank == 1) return "hero";
BetterChat?.Call("API_AddUserToGroup", player.UserIDString, "hero");
humanityData.playerH[player.userID].Rank = 1;
SendReply(player, lang.GetMessage("NowA", this), "hero");
}else{
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "bandit"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "bandit");
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "hero"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "hero");
if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "neutral")) || playerData.Rank == 0) return "neutral";
BetterChat?.Call("API_AddUserToGroup", player.UserIDString, "neutral");
humanityData.playerH[player.userID].Rank = 0;
SendReply(player, lang.GetMessage("NowA", this), "neutral");
}Please help me :)