Forum

> > CS2D > Scripts > How put you script on your server
Forums overviewCS2D overview Scripts overviewLog in to reply

English How put you script on your server

9 replies
To the start Previous 1 Next To the start

old Re: How put you script on your server

GeoB99
Moderator Off Offline

Quote
In sys folder there's a folder called "lua" click it. After that in this lua folder you can put the scripts here but to activate them you must write the dofile in server.lua
Example:
1
dofile("sys/lua/yourscriptname.lua")

But you can do without writing the dofile and to do that, in lua folder there is also the autorun file to paste the scripts instead to write the dofile and you're done.

Btw, you could find in search such things we have tons of threads about this.

old Re: How put you script on your server

XoOt
Super User Off Offline

Quote
It also seems like you forgot how to read hints & tips when you create a thread

Using the searchfunction would have already given you the answer.

cs2d.com has written
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.


The first step you have to do (no matter what problem you have) is to check the f.a.q., most stuff will be answered by just taking a minute to read it.

old Re: How put you script on your server

GeoB99
Moderator Off Offline

Quote
@user ziomek1212: Did you pasted the script correctly in lua folder? What does the error say, it tells you something?

Just follow the steps in my previous reply, if the problem still persist tell us what's the problem but in a explicit way.

old Re: How put you script on your server

CaneCorso
User Off Offline

Quote
Kalis is already a bugged lua , but it work.
Install a new cs2d , paste the hole script on the folder , be sure uve added the dofile to the server.
Start the server if wont , post ur error with your lua which have bug
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview