Forum

> > CS2D > Scripts > multiple scripts
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch multiple scripts

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt multiple scripts

Doctard
User Off Offline

Zitieren
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

alt Re: multiple scripts

J4x
User Off Offline

Zitieren
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).

alt Re: multiple scripts

DevGru
User Off Offline

Zitieren
user Doctard hat geschrieben
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.

alt Re: multiple scripts

Stopieee
User Off Offline

Zitieren
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

alt Re: multiple scripts

DevGru
User Off Offline

Zitieren
user KagamineLen hat geschrieben
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.

alt Re: multiple scripts

troctor
User Off Offline

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

If you have 2 hooks like:

Lua 1 hat geschrieben
addhook("spawn","ifspawn")


and in the other u have

Lua 2 hat geschrieben
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.

alt Re: multiple scripts

Apache uwu
User Off Offline

Zitieren
user Stopieee hat geschrieben
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht