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

Scritp Of Punishiment MC

ayla

New Member
Joined
Jul 8, 2009
Messages
71
Reaction score
0
Could Somebody Bring Me as My Titles SAys
Punishiment Script Of Mc? From Experiencie?
Heeeeeeeeeeeeeeeeeeelp
 
Lua:
function onKill(cid, target)
        if isPlayer(target) == TRUE then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
		doPlayerAddExperience(cid, -1000000)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
        end
end
        return TRUE
end
 
Lua:
function onKill(cid, target)
        if isPlayer(target) == TRUE then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
		doPlayerAddExperience(cid, -1000000)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
        end
end
        return TRUE
end

Wrong..

Change:
Code:
if getPlayerIp(cid) ~= getPlayerIp(target) then

To
Code:
if getPlayerIp(cid) [COLOR="red"]==[/COLOR] getPlayerIp(target) then
 
and for example in creaturescripts i should add for example....
<event type="think" name="mcip" event="script" value="mcip.lua"/> something like this
and in the "think" what i should put?
 
and for example in creaturescripts i should add for example....
<event type="think" name="mcip" event="script" value="mcip.lua"/> something like this
and in the "think" what i should put?

Lua:
	<event type="kill" name="punishment" event="script" value="punishment.lua"/>
 
Lua:
function onKill(cid, target, lastHit)

	if isPlayer(target) and isPlayer(cid) then
		if getPlayerIp(cid) == getPlayerIp(target) then
			return doPlayerAddExperience(cid, -100000) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Keep killing players with the same ip as you and you'll be a rookie again!")
		end
	end
	return true
end

XML:
 	<event type="kill" name="AntiMC" event="script" value="antimc.lua"/>
 
Back
Top