• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Block Mwalls and etc in events

xkevinz

Member
Joined
Aug 15, 2007
Messages
358
Reaction score
5
is it possible to make a code where it blocks people from using mwalls and etc because it ruins the fun of teh events
 
this what i use

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1498)
local ctfArena = {
  frompos = {x=31694, y=32709, z=7},
  topos = {x=31744, y=32774, z=7},
}
local warArena = {
  frompos = {x=31728, y=32704, z=7},
  topos = {x=31755, y=32763, z=7},
}
local satanQuest = {
  frompos = {x=771, y=2225, z=9},
  topos = {x=775, y=2229, z=9},
}
function onCastSpell(cid, var)
	if not isInArea(getPlayerPosition(cid), ctfArena.frompos, ctfArena.topos) and not isInArea(getPlayerPosition(cid), warArena.frompos, warArena.topos) and not isInArea(getPlayerPosition(cid), satanQuest.frompos, satanQuest.topos) then
		return doCombat(cid, combat, var)
	else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may not use this rune in zombie or ctf events.")
	end
end
 
Back
Top Bottom