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

onLogout(cid) ~ 0.4!

iruga

#S¥Ơ'..
Joined
May 18, 2009
Messages
371
Reaction score
4
Location
Brazil
how i can do this.

XML:
<event type="logout" name="logout" event="script" value="logout.lua"/>
Lua:
function onLogout(cid)
	  if getCreatureOutfit(cid).lookType == 374 then
             doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUCANNOTLOGOUTHERE)
              end
        return true
      end

I need to block if someone try logout with outfit 374..
the function onLogout still work in 0.4? :eek:
 
Try:

Lua:
function onLogout(cid)
	  if getCreatureOutfit(cid).lookType == 374 then
             doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUCANNOTLOGOUTHERE)
             return false
              end
        return true
      end
 
just add a return false

Lua:
function onLogout(cid)
	if getCreatureOutfit(cid).lookType == 374 then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUCANNOTLOGOUTHERE)
		return false
	end
	return true
end


kind regards, Evil Hero.
 
Back
Top Bottom