I dont played a long time and i forgot verry much from this game. Can someone tell me, how can you put some script on your server/new game?
Forum
CS2D Scripts How put you script on your serverHow put you script on your server
9 replies 1
I dont played a long time and i forgot verry much from this game. Can someone tell me, how can you put some script on your server/new game?
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.
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.
Someone help?
so it would be like
1
sys/lua/lua
And did you put the line
1
dofile
Just follow the steps in my previous reply, if the problem still persist tell us what's the problem but in a explicit way.
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
1