Forum

> > CS2D > Scripts > For Lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch For Lua

10 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt For Lua

1s1s
User Off Offline

Zitieren
When I download Lua how I put it in my server can u explain me how doing that?

alt Re: For Lua

EP
User Off Offline

Zitieren
> 1st form:
1- Extract that lua in Counter Strike 2D/sys/lua/
2- Open Counter Strike 2D
3- Goto New Game
4- Goto More Setting
5- Find mp_luaserver
6- Change server.lua to THENAMEOFYOURLUA.lua
7- Click in Apply
8- Now you can start your server with dedicated or just click Start in that listen server

> 2nd form:
1- Goto Counter Strike 2D/sys/
2- Open "server.cfg"
3- Find mp_luaserver
4- Change "server.lua" to "nameofyourlua.lua"
5- Save
6- Close it
7- Done,

alt Re: For Lua

oxytamine
User Off Offline

Zitieren
Add "dofile" attribute to "server.lua" file. user EP is wrong. It's retarded way.

alt Re: For Lua

Starkkz
Moderator Off Offline

Zitieren
user oxytamine hat geschrieben
Add "dofile" attribute to "server.lua" file. user EP is wrong. It's retarded way.


Why did you mean that?, that way is useful and faster than puting dofile in server.lua
Also that's why DC put that command.

alt Re: For Lua

Flacko
User Off Offline

Zitieren
user Starkkz hat geschrieben
user oxytamine hat geschrieben
Add "dofile" attribute to "server.lua" file. user EP is wrong. It's retarded way.


Why did you mean that?, that way is useful

Actually, it's useless because you can only use one script at the same time. Dofile might be harder to use for newbies but it's the best way to do it.

alt Re: For Lua

MikuAuahDark
User Off Offline

Zitieren
best way:
1. go to <YOUSCS2DPATH>(Most in C:\Counter-Strike 2D)\sys\lua
2. open server.lua with notepad
3. you will see some --dofile("sys/lua/blabla.lua")
4. put this at end of server.lua:
dofile("sys/lua/<YOULUANAME>.lua")
5. don't forgot to save...

there is a also sample script ready. just delete the -- before dofile

to disable script, just add -- before dofile

alt Re: For Lua

Flacko
User Off Offline

Zitieren
protip: It works without parenthesis too.
1
dofile "sys/lua/name.lua"

alt Re: For Lua

Apache uwu
User Off Offline

Zitieren
It doesn't work with variables

1
2
myfile="sys/lua/name.lua"
dofile myfile

alt Re: For Lua

Flacko
User Off Offline

Zitieren
user Apache uwu hat geschrieben
It doesn't work with variables

1
2
myfile="sys/lua/name.lua"
dofile myfile


No, but it works with tables too

alt Re: For Lua

Starkkz
Moderator Off Offline

Zitieren
user Flacko hat geschrieben
user Apache uwu hat geschrieben
It doesn't work with variables

1
2
myfile="sys/lua/name.lua"
dofile myfile


No, but it works with tables too


does it support more than a parameter?

alt Re: For Lua

Flacko
User Off Offline

Zitieren
I think not, otherwise the code would get confusing.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht