• 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 getCreatureOutfit() outside the function

WarOfTheTitans

Active Member
Joined
Feb 3, 2012
Messages
430
Reaction score
37
Is there any way to get the player looktype or addon outside the function? I really need it because it is checking the players outfit and gives the player the same addon/looktype but with another color and then gives condition "CONDITION_OUTFIT".

I don't want to use "doCreatureChangeOutfit(cid)" because the player got locked outfit. So thats why I am using condition.

for example:

Lua:
	local x = getCreatureOutfit(cid)
	local outfit = {lookType = x.lookType, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114, lookTypeEx = x.lookTypeEx, lookAddons = x.lookAddons}
	
	local time = 5 -- min
	local outfit = createConditionObject(CONDITION_OUTFIT)
	setConditionParam(outfit, CONDITION_PARAM_TICKS, time*1000*60)
	addOutfitCondition(outfit, outfit)
	
	local function -- here begins the function that is containing "(cid)"
	doAddCondition(cid, outfit)
	return true end

The problem is that the condition:
Lua:
	local outfit = createConditionObject(CONDITION_OUTFIT)
	setConditionParam(outfit, CONDITION_PARAM_TICKS, time*1000*60)
	addOutfitCondition(outfit, outfit)
needs to be outside of the function and:
Lua:
	local x = getCreatureOutfit(cid)

have to be inside the function ...

Is there any other way to check the players outfit?

Thanks :) rep ++
 
Back
Top