Forum

> > CS2D > Scripts > multiple scripts
Forums overviewCS2D overview Scripts overviewLog in to reply

English multiple scripts

8 replies
To the start Previous 1 Next To the start

old multiple scripts

Doctard
User Off Offline

Quote
i was wondering if you could use 2 lua's at the same time if you can plz tell me and i give you cookie

old Re: multiple scripts

J4x
User Off Offline

Quote
Yes you can, but it all depends of the types of scripts.
Example: You can't use 2 classes ( I mean those where you can choose a class, like soldier and all that stuff) lua at the same time, tha may lead to trouble with menus (If the both use the same system).

old Re: multiple scripts

DevGru
User Off Offline

Quote
user Doctard has written
i was wondering if you could use 2 lua's at the same time if you can plz tell me and i give you cookie


Actually you can run more than 5 lua scripts but like Pwnisher said it depends on what type of script it is you are running.

old Re: multiple scripts

Stopieee
User Off Offline

Quote
Me too

how do you do it?

I want to put my Tlex and Unlimitedbuild lua in one...

tell me how please or make a lua

Thanks cookie

old Re: multiple scripts

DevGru
User Off Offline

Quote
user KagamineLen has written
give me your lua i'll fix it for you


*Mega facepalm*

@user Doctard: Steps

> Open your CS2D folder
> Open the sys folder
> Open the lua folder
> Open server.lua text file
> Write this on the bottom part:
1
2
dofile("sys/lua/<lua name.lua>")
dofile("sys/lua/<lua name.lua>")

• Note: Make sure you put the lua scripts on the lua folder.

old Re: multiple scripts

troctor
User Off Offline

Quote
Well.. the thing is you CAN use 2 scripts at same time.. the problem is this:

If you have 2 hooks like:

Lua 1 has written
addhook("spawn","ifspawn")


and in the other u have

Lua 2 has written
addhook("spawn","onspawn")


And in the lua executer you has

1
2
dofile("sys/lua/Lua 2.lua")
dofile("sys/lua/Lua 1.lua")

It will only hook the lua of the Lua 2, because is the first lua readed. And what happens with the hook of Lua 1? It doesnt function.

old Re: multiple scripts

Apache uwu
User Off Offline

Quote
user Stopieee has written
Me too

how do you do it?

I want to put my Tlex and Unlimitedbuild lua in one...

tell me how please or make a lua

Thanks cookie


I believe you could just use parse. If it's quick build it should add in nicely. As long as they don't add any hooks that are taken.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview