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

Elf Outfit for 7 day!!!

johny5608

johny
Joined
Oct 5, 2008
Messages
120
Reaction score
0
Location
Wien
Hello Otlanders,
I need a script that player can buy Elf outfit in Sms shop for days. Example: Elf Outfit for 5 Days for 50 Points.
After 5 day the outfit will remove from player and when he had the outfit on him than it will transform him to citizen outfit. But the player can change the coulors of the Head,body,shoes of elf outfit.
And that same with Dwarf outfit!

Can somebody make me this script! Please! Thanks
 
I have Maded a script for it but i don't know ob it will function?
Cas somebody look at it and say me wehre i have bugs etc.

Actions/Outfit.lua


Code:
function onUse(cid, item, frompos, item2, topos)
local t = {
	{name = 'Elf'},
}
		for k, v in ipairs(t) do
			if not canPlayerWearOutfitId(cid, k, 3) then
				doPlayerAddOutfitId(cid, k, 3)
				setPlayerStorageValue(cid, 917283, (getPlayerStorageValue(cid,917283) + 5))
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You can now wear ' .. v.name .. ' addons.')
				doRemoveItem(item.uid, 1)
				break
			end
		end
	end

globalevents/removeoutfit.lua


Code:
function onThink(cid, item, fromPosition, toPosition)

	for _, name in ipairs(getOnlinePlayers()) do
		local player = getPlayerByName(name)
		if getPlayerStorageValue(player,917283) > 1 then
			setPlayerStorageValue(player,917283,getPlayerStorageValue(player) - 1)
		end
	end
end

globalevents/removeelfoutfit.lua


Code:
function onThink(cid, item, fromPosition, toPosition)

	for _, name in ipairs(getOnlinePlayers()) do
		local player = getPlayerByName(name)
		if getPlayerStorageValue(player,917283) == 1 then
			setPlayerStorageValue(player,917283,0)
		end
	end
end

Thanks!
 
Last edited:
Back
Top