• 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!

stopping exp from killing mc on war serv

xkevinz

Member
Joined
Aug 15, 2007
Messages
358
Reaction score
5
I am hosting an war server atm and how do I stop it from like if someone is mcing and has the same ip and if they kill their own mc they won't receive exp? thank you
 
Depends on which war server your using.
We're using a line in our script:

fragreward.lua:
LUA:
function onKill(cid, target)
        if isPlayer(target) == TRUE then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
        loot = 2152 
	  item = doPlayerAddItem(cid,loot,1)
	elseif getPlayerName(cid) == getPlayerName(target) then
	  doPlayerAddItem(cid,loot,1)
else
		doPlayerAddExperience(cid, -10000000)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
        end
end
        return TRUE
end

And added in login.lua:
LUA:
registerCreatureEvent(cid, "FragReward")

Hope it helps.
 

Similar threads

  • Question Question
RevScripts BLOCK MC PVP
Replies
4
Views
692
Back
Top