• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

How to create second Login.lua ?

tanii

Empire-war.com
Joined
Jan 16, 2015
Messages
383
Solutions
1
Reaction score
12
Hello guys i want to know how to create second login.lua
Beause i have some problems with login.lua when i put some scripts or registers on login.lua it dosent work.

But when i replace login.lua from other ot that scripts works 100%

Now i want to create second login.lua

Can some one help me how to create i dont want touch my first login.lua in creatures and i want add second login.lua in creatures.

Hope you undertand.

Thank you.

Version: 8.6
 
Simply create a new file call it whatever you want and use the onLogin function and register the script as login in creaturesscripts.xml.

I already try but i dont know still fail the scriot not working.

Can you give me any example what to put in second login i think i am doig something rong.
 
creaturescripts.xml
Code:
<event type="login" name="secondLogin" event="script" value="secondLogin.lua"/>

secondLogin.lua
Code:
function onLogin(cid)

   -- code here

   -- register events like this.
   registerCreatureEvent(cid, "whatever")
   return true
end

You still need to register the login script in the original login.lua file.
Code:
registerCreatureEvent(cid, "secondLogin")
 
Back
Top