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

Lua Kill Reward

owned

Excellent OT User
Joined
Nov 9, 2008
Messages
2,001
Solutions
3
Reaction score
558
Location
New York
Heres my script:
function onKill(cid, target, lastHit)
if getPlayerParty(cid) == getPlayerParty(target) or getPlayerIp(cid) == getPlayerIp(target) then return doPlayerAddExp(cid, -0) and doPlayerSendTextMessage(cid, 20, "You have been punished for killing a player of the same IP.") and setPlayerStorageValue(cid, 3000, getPlayerStorageValue(cid, 3000)+1) end
return doPlayerAddItem(cid, 2152, 1)
end

how can i make this so that it will only apply this for players??
 
Code:
function onKill(cid, target, lastHit)
	if isPlayer(target) then
		if getPlayerParty(cid) == getPlayerParty(target) or getPlayerIp(cid) == getPlayerIp(target) then
			doPlayerAddExp(cid, -0)
			doPlayerSendTextMessage(cid, 20, "You have been punished for killing a player of the same IP.")
			setPlayerStorageValue(cid, 3000, getPlayerStorageValue(cid, 3000)+1)
		else
			doPlayerAddItem(cid, 2152, 1)
		end
	end
	return true
end
 
Back
Top