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

Solved Edited frag reward dont work, can fix please?

Ghazer

Member
Joined
Mar 13, 2009
Messages
350
Reaction score
6
Anyone can fix this script please?, I dont know thats wrong... I think is easy to people who know...

Dont work broadcast, and reward per kills...

Lua:
function onKill(cid, target, lastHit)
	if cid ~= target and isPlayer(target) 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.')
		else
			doPlayerAddItem(cid, 2160, 1)
			setPlayerStorageValue(cid, 6776, getCreatureStorage(cid, 6776) + 1)
		end
	end
 
	if(getPlayerStorageValue(cid, 6776) == 5) and getCreatureStorage(cid, 6001) == -1 then
		doBroadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed 5 players!")
		setPlayerStorageValue(cid, 6001, 1)
		doPlayerAddItem(cid, 2160, 10) -- 10cc as reward for killing 5 players
 
	elseif(getPlayerStorageValue(cid, 6776) == 100) and getCreatureStorage(cid, 6002) == -1 then
		doBroadcastMessage(getCreatureName(cid) .. " is dominating! He killed 100 players!")
		setPlayerStorageValue(cid, 6002, 1)
		doPlayerAddItem(cid, 2160, 25) -- 25cc as reward for killing 100 players
 
	elseif(getPlayerStorageValue(cid, 6776) == 200) and getCreatureStorage(cid, 6003) == -1 then
		doBroadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed 200 players!")
		setPlayerStorageValue(cid, 6003, 1)
		doPlayerAddItem(cid, 2160, 50) -- 50cc as reward for killing 100 players
 
	elseif(getPlayerStorageValue(cid, 6776) == 400) and getCreatureStorage(cid, 6004) == -1 then
		doBroadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed 400 players! DO SOMETHING!")
		setPlayerStorageValue(cid, 6004, 1)
		doPlayerAddItem(cid, 2640, 1) -- soft boots as reward for killing 400 players
 
	elseif(getPlayerStorageValue(cid, 6776) == 600) and getCreatureStorage(cid, 6005) == -1 then
		doBroadcastMessage("Bow down to your new god! " ..getCreatureName(cid).. " has 600 frags!")
		setPlayerStorageValue(cid, 6005, 1)
		doPlayerAddItem(cid, 8266, 1) -- kosheis amulet as reward for killing 600 players
 
	elseif(getPlayerStorageValue(cid, 6776) == 700) and getCreatureStorage(cid, 6006) == -1 then
		doBroadcastMessage(getCreatureName(cid) .. " is not a human! He killed 700 players!")
		setPlayerStorageValue(cid, 6006, 1)
		doPlayerAddItem(cid, 9932, 1) -- firewalker boots as reward for killing 700 players
	end
	return true
end

- - - Updated - - -

I fix
 
Last edited:
Back
Top