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

Co tu jest nie tak...

Status
Not open for further replies.

straher

???
Joined
Mar 23, 2010
Messages
255
Reaction score
3
mam taki oto fragreward, ale ten pierun nie chce dzialac

Lua:
function onDeath(cid, corpse, deathList)
local reward = {
        item = 5944,
        count = 1
}
	for i = 1, #deathList do
		if isPlayer(cid) and isPlayer(deathList[i]) then
			if getPlayerIp(cid) ~= getPlayerIp(deathList[i]) then	
				if getPlayerItemCount(deathList[i], reward.item) > 0 then
					local item = getPlayerItemById(deathList[i], true, reward.item)
					if item.type >= ITEMCOUNT_MAX then
						doPlayerAddItem(deathList[i], reward.item, reward.count)
doPlayerAddItem(cid, 2151, 1)

						doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
						doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
					else
						doTransformItem(item.uid, reward.item, item.type + 1)
						doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
						doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
					end
				else
					doPlayerAddItem(deathList[i], reward.item, reward.count)
doPlayerAddItem(cid, 2151, 1)
					doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
					doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
				end
			else
				doPlayerSendTextMessage(deathList[i], 18, "You didn't get frag/reward because of killing a player with same ip.")
				
			end
		end
	end
	return true
end

wpis do creatureevents.xml jest

+ po co ten storydż:

Lua:
function onLook(cid, thing, position, lookDistance)
	if isPlayer(thing.uid) then
		doPlayerSetSpecialDescription(thing.uid, ". \n Frags: "..math.max(0, getPlayerStorageValue(thing.uid, 20233)))
	end
	return true
end

powinno zwracac ilosc zabitych
 
Last edited:
dobra, juz naprawilem, nie wpisalem do login.lua nob ze mnie
 
Ostatni raz przepuszczam temat z takim tytułem.
 
Status
Not open for further replies.
Back
Top