• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Anti GMIsland

titkata

Emulation Addict
This script is used to check if the player has GMRank 2, if so you can access the GMIsland, but if you are lower than Rank 2 = you cant'

Code:
print(">>  Loading Anti GMIsland | Coded by TITKATA_BG <<")
local area = 876

-- To where the non gm's will be teleported
local map = 0
local x = 0
local y = 0
local z = 0
local o = 0

local function GMArea(event, player)
    if (player:GetAreaId() == area) then
        if (player:GetGMRank() < 2) then
		player:Teleport(map, x, y, z, o)
		player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
		player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
		player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
		player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
		player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
	end
		if(player:GetGMRank() >= 2) then
		player:SendBroadcastMessage("You are rank "..player:GetGMRank()..", so you can go to GM Island! Enjoy your stay!|r")
		end
    end
end

RegisterPlayerEvent(27, GMArea)
 

kozow

New member
similar script:


Code:
--[==[
]==]

ZoneCheck = {}

ZoneCheckName = "|CFF1CB619[Zone Check System]|r"

ZoneCheck.Settings = {
TimeToTeleport = 5, -- Set 0 to Instant Teleport
Spell = 9454,
};

-- AreaId, ZoneId, MapId
ZoneCheck.ZonesAreas = {
[1] = { 876, 876, 1}, -- GM Island
};

function ZoneCheck.OnEnterZone(event, player, newZone, newArea)
local PlayerName = player:GetName()
local newMap = player:GetMapId()

for i, v in ipairs(ZoneCheck.ZonesAreas) do
if newArea == v[1] and newZone == v[2] and newMap == v[3] and player:IsGM() == false then
player:AddAura(ZoneCheck.Settings.Spell, player)
player:SetLuaCooldown(ZoneCheck.Settings.TimeToTel eport, 6)
player:RegisterEvent(ZoneCheck.CooldownCheck, 1000, player:GetLuaCooldown(6))
player:SendBroadcastMessage(string.format("%s You not a GameMaster you cant enter this zone!", ZoneCheckName))
for _, v in pairs(GetPlayersInWorld()) do
if v:IsGM() == true then
v:SendBroadcastMessage(string.format("%s Player %s Enter Zone %s Area %s Map %s without GM rights", ZoneCheckName, player:GetName(), newZone, newArea, newMap))
end
end
end
end
end

function ZoneCheck.CooldownCheck(event, delay, repeats, player)
if player:GetLuaCooldown(6) == 0 then
player:RemoveEventById(event)
player:RemoveAura(ZoneCheck.Settings.Spell)
player:Teleport(1, 956.240356, -3754.055176, 5.357097)
elseif player:GetLuaCooldown(6) <= ZoneCheck.Settings.TimeToTeleport then
player:SendBroadcastMessage(string.format("%s You will teleport in %s seconds!", ZoneCheckName, player:GetLuaCooldown(6)))
if player:IsGM() == true then
player:RemoveEventById(event)
player:RemoveAura(ZoneCheck.Settings.Spell)
end
end
end

RegisterPlayerEvent(27, ZoneCheck.OnEnterZone)
 
Last edited:
Top