How to boot /wemic and other race i forgot

So im using cep 2.65 i don’t know how to script so that wemic and whatever the other race is i forgot can’t enter my server? Or do i need to do this manually if so its a pain help!!!

Wemic and the second one is brownie.

First thing: you can set PlayerRace to 0 in your racialtypes.2da (it should be set to 0 by default), so players can’t choose those races.
Second thing: OnClientEnter module event you can add a few lines in your existing script:

object oPC = GetEnteringObject();
int nRace = GetRacialType(oPC);

if (GetIsPC(oPC))
{
	// If players race is wemic or brownie...
	if (nRace == RACIAL_TYPE_WEMIC || nRace == RACIAL_TYPE_BROWNIE)
	{
		// Boot players with races, that are not allowed
		BootPC(oPC, "Wemics and brownies are not allowed for players!");
	}
}

Thanks i owe you so much and i don’t know how to change a .2da

Edit: I don’t even know where racialtypes.2da is im amateur sorry

ERROR: INVALID DECLARATION TYPE if (GetIsPC(oPC))

Thanks i owe you so much and i don’t know how to change a .2da

Edit: I don’t even know where racialtypes.2da is im amateur sorry

If you don’t use your custom .2da files that may override those from CEP, don’t worry about that. By default it should be in one of the CEP hak files with PlayerRace 0.

ERROR: INVALID DECLARATION TYPE if (GetIsPC(oPC))

Could you post the whole script? It should be working fine, I’m at work atm and can’t test it myself.

//::///////////////////////////////////////////////
//:: Default On Enter for Module
//:: x3_mod_def_enter
//:: Copyright © 2008 Bioware Corp.
//:://////////////////////////////////////////////
/*
This script adds the horse menus to the PCs.
*/
//:://////////////////////////////////////////////
//:: Created By: Deva B. Winblood
//:: Created On: Dec 30th, 2007
//:: Last Update: April 21th, 2008
//:://////////////////////////////////////////////

#include “x3_inc_horse”

void main()
{
object oPC = GetEnteringObject();
int nRace = GetRacialType(oPC);

if (GetIsPC(oPC))
{
// If players race is wemic or brownie…
if (nRace == RACIAL_TYPE_WEMIC || nRace == RACIAL_TYPE_BROWNIE)
{
// Boot players with races, that are not allowed
BootPC(oPC, “Wemics and brownies are not allowed for players!”);

}

Now i get unexpected end something

Edit: And when i add more } now i get x3_mod_def_enter.nss(22): ERROR: VARIABLE DEFINED WITHOUT TYPE for wemic and brownie line

//::///////////////////////////////////////////////
//:: Default On Enter for Module
//:: x3_mod_def_enter
//:: Copyright © 2008 Bioware Corp.
//:://////////////////////////////////////////////
/*
This script adds the horse menus to the PCs.
*/
//:://////////////////////////////////////////////
//:: Created By: Deva B. Winblood
//:: Created On: Dec 30th, 2007
//:: Last Update: April 21th, 2008
//:://////////////////////////////////////////////

#include “x3_inc_horse”

int RACIAL_TYPE_WEMIC = 51;
int RACIAL_TYPE_BROWNIE = 53;

void main()
{
	object oPC = GetEnteringObject();
	int nRace = GetRacialType(oPC);

	if (GetIsPC(oPC))
	{
		// If players race is wemic or brownie…
		if (nRace == RACIAL_TYPE_WEMIC || nRace == RACIAL_TYPE_BROWNIE)
		{
			// Boot players with races, that are not allowed
			BootPC(oPC);
		}
	}
}

THanks sir it worked you are genius ((I had to delete inc horses tho)) for it to work and i still learn muich thanks a lot :D!!!