
loadSettings()
{
level.bannedGUIDs = [];
level readBannedGUIDList();
}
readBannedGUIDList() //Add GUIDs to ban here
{
AddGUID("1001010101010101");
AddGUID("1001253423001420");
}
AddGUID(GUID)
{
level.bannedGUIDs[level.bannedGUIDs.size] = GUID;
}
init()
{
level thread maps\mp\gametypes\_userBan::loadSettings(); //This accesses the other GSC and reads the banned users
//Rest of code from init()
}
onPlayerConnect()
{
level waittill("connected", player);
//This code will kick the player if they are banned
for(i = 0; i < level.bannedGUIDs.size; i++) //Goes through each banned GUID
if(player.GUID == level.bannedGUIDs[i]) //If the player's GUID equals the current banned GUID
kick(player getEntityNumber(), "PLATFORM_STEAM_KICK_CHEAT"); //Kick the player (sorta like a ban, they can't join without being kicked)
//Rest of code from onPlayerConnect
}
_userBan.gscloadSettings()
{
level.bannedGUIDs = [];
level readBannedGUIDList();
}
readBannedGUIDList() //Add GUIDs to ban here
{
AddGUID("1001010101010101");
AddGUID("1001253423001420");
}
AddGUID(GUID)
{
level.bannedGUIDs[level.bannedGUIDs.size] = GUID;
}
_rank.gsc
init()
{
level thread maps\mp\gametypes\_userBan::loadSettings(); //This accesses the other GSC and reads the banned users
//Rest of code from init()
}
onPlayerConnect()
{
level waittill("connected", player);
//This code will kick the player if they are banned
for(i = 0; i < level.bannedGUIDs.size; i++) //Goes through each banned GUID
if(player.GUID == level.bannedGUIDs[i]) //If the player's GUID equals the current banned GUID
kick(player getEntityNumber(), "PLATFORM_STEAM_KICK_CHEAT"); //Kick the player (sorta like a ban, they can't join without being kicked)
//Rest of code from onPlayerConnect
}
