• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

No exp from same ip.

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
287
Reaction score
2
I got this script from Shawak's War Server.
I need a script for tfs 0.3.6 that prevents exp from the same ip.

Code:
dofile("war.lua")

function onKill(cid, target, lastHit)

	if isPlayerExample(cid) == true then
		return true
	end

	local p_skullStorage = getPlayerStorageValue(cid, skullStorage)

	if isPlayer(target) == TRUE then
		if getPlayerIp(cid) == getPlayerIp(target) and string.lower(allowSelfLeveling) ~= "yes" then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't gain points or experience from players with the same ip then you.")
			return true
		end
		doPlayerAddPoints(cid, 1)
		doPlayerAddExp(cid, (getPlayerExperience(target)/20))
		setPlayerStorageValue(cid, skullStorage, p_skullStorage + 1) 
	end
	return true
end
 
Last edited:
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,0)
else
		doPlayerAddExperience(cid, -0)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
        end
end
        return TRUE
end
 
Back
Top