• 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 What wrong on my script??

RaikND

facebook.xenoria.org
Joined
May 12, 2010
Messages
942
Reaction score
10
Location
Spain
here script:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

playerTown = getPlayerTown(cid)

if doPlayerSetTown(cid, 3)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Your new residence is Darashia!")
elseif playerTown == 3 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You residence is Darashia.")
end
return false
end

what wrong??
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerTown(cid) == 3 then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'You residence is already in Darashia.')
	else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'Your new residence is Darashia!')
		doPlayerSetTown(cid, 3)
	end
	return true
end
 
Back
Top