Forum

> > CS2D > General > i dont know how to add a lua
Forums overviewCS2D overviewGeneral overviewLog in to reply

English i dont know how to add a lua

7 replies
To the start Previous 1 Next To the start

old Re: i dont know how to add a lua

Rainoth
Moderator Off Offline

Quote
Method 1:
Download lua.
Name it as 'mapname.lua'
for example:
'de_dust.lua'

Whenever you play on 'de_dust' map, the script will run. Make sure your settings allow it, though.

Method 2:
Download lua.
Place it in your CS2D folder in 'sys/lua/' directory
Open 'server.lua'
write
dofile("sys/lua/YourLuaName.lua")
save and close that file.

Method 3:
Download lua
Go to 'sys/lua/autorun/'
Put your file there.

old Re: i dont know how to add a lua

XoOt
Super User Off Offline

Quote
You could have checked the f.a.q. of cs2d.

Cs2d.com:
Simply put your Lua scripts into the folder"sys\lua\autorun". CS2D will then automatically execute them when you start a server / create a new game.Alternative way: You can also add one line in the file"sys\lua\server.lua" for each script-file you want to use:dofile("YOUR-SCRIPT-FILE.lua")Add these lines at the end of the file! Use a text editor to open the server.lua file!Lua scripts do only work if you are the one who creates/hosts the server!"sys\lua\server.lua" is the standard location for Lua scripts. It can be changed with mp_luaserverMap scripts: The third way is to call the file like the map you want to run just with ".lua" as file extension and to put it into the "maps"-folder. The script will then only be executed when you play on that specific map.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview