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

Lua Transform player to outfit

Magictibiaman

New Member
Joined
May 25, 2009
Messages
371
Reaction score
0
how do i make it so once i teleport the player to the arena
his outfit is set to this (type-129 head-95 legs-95 feet-95 body - 95) and he can't change it

???
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

	local newPosition = {x = 32549, y = 31479, z = 7}
	local storage = 6001 --storage that verifies if the player is at the event or not (1 = is in event, 0 = isn't in event)
	doTeleportThing(cid, newPosition)
	function onOutfit(cid, old, current)
		if (getPlayerStorageValue(cid, storage) ==1 and current.lookType ~= old.lookType) then 
			return 1
		end
	return true
end
 
if (getPlayerStorageValue(cid, storage) == 1 and current.lookType ~= old.lookType) then

On that line you need to put a space between your == 1. Also you do not get local values for old and current look types. So you need to add something like this up.

local old = getPlayerOutfit(cid)
local current = doPlayerSetOutfit(cid, outfit=129, head=95,legs=95, feet=95, body=95)
 
Back
Top