Forum

> > CS2D > General > Lua Scripting:Help!
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripting:Help!

31 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Lua Scripting:Help!

2340432z
User Off Offline

Zitieren
Hi everyone! I need help on understanding lua scripts. You see i have never used lua scripts and they sound very interesting based on the new version of cs2d
0.1.1.4 or w/e it was called. can any1 get me a tutorial? thank you

2340432z

alt Re: Lua Scripting:Help!

Admir
User Off Offline

Zitieren
2340432z hat geschrieben
Hi everyone! I need help on understanding lua scripts. You see i have never used lua scripts and they sound very interesting based on the new version of cs2d
0.1.1.4 or w/e it was called. can any1 get me a tutorial? thank you

2340432z


http://amx2d.co.cc <-- You can learn it from here.

alt Re: Lua Scripting:Help!

Lee
Moderator Off Offline

Zitieren
absolutely, if you have any questions on lua scripting, just ask away and I'll answer it to the best of my ability. For a quick primer to get you started on Lua (This is very introductory and does not actually apply CS2D at alll, but rather an introduction to the language to get you started) go to

http://amx2d.co.cc/viewtopic.php?f=13&t=24

I will be writing an applied tutorial about integrating Lua with CS2D shortly so stay tuned. Also, if you have any specific questions to ask about Lua, you can always ask it at http://amx2d.co.cc/viewforum.php?f=11 and I'll try my best to answer.

alt Re: Lua Scripting:Help!

Night Till Death
User Off Offline

Zitieren
i got a strange thing! the mods work but when i start the gungame it goes the other way around! it levels up from max lvl to minimum isnt therea way to turn the tables?

alt Re: Lua Scripting:Help!

Lee
Moderator Off Offline

Zitieren
if you're using my mod just login via !login admin password and use @gg_reverse in game to reverse the levels

Alternatively, the gun game default is set on the reversed level from the more powerful weapons to pistols, you can change this in sys/lua/amx2d/settings/gg_levels.cfg

alt Re: Lua Scripting:Help!

Night Till Death
User Off Offline

Zitieren
can you give me a link where i can download your gungame? when ever i search on the site you told all i find is an intorduction thats all!

alt Re: Lua Scripting:Help!

Night Till Death
User Off Offline

Zitieren
strange i have another bug! it looks like my anti virus has deleted the all the lua mods so i had to reinstall cs2d! but now when i put all the files in sys/lua the mods dont work!

alt Re: Lua Scripting:Help!

Lee
Moderator Off Offline

Zitieren
have you changed the server.lua file to

1
2
dofile("lua/amx2d/main.lua")()
main("sys/lua/amx2d")

Also, try opening the console on server load to see if there's any error messages, if there are, report them here and I'll do my best to fix them.

alt Re: Lua Scripting:Help!

chuico123
User Off Offline

Zitieren
can anyone send me a template for a script that allows you to set how much pistols or grenades you can carry? so i can make such a mod, so its like you are using a belt that allows you to carry like 5 HEs, 3 FBs and 2 SGs, if i succefully make such a mod i will give credits if i post it

alt Re: Lua Scripting:Help!

Lee
Moderator Off Offline

Zitieren
chuico123 hat geschrieben
can anyone send me a template for a script that allows you to set how much pistols or grenades you can carry? so i can make such a mod, so its like you are using a belt that allows you to carry like 5 HEs, 3 FBs and 2 SGs, if i succefully make such a mod i will give credits if i post it


There's a way of doing this indirectly but it'll use some offhand techniques (But then again, since the lua engine just came out, practically all techniques are experimental at the moment) I'll post what I have once I get decently through into it.

alt Re: Lua Scripting:Help!

chuico123
User Off Offline

Zitieren
leegao hat geschrieben
There's a way of doing this indirectly but it'll use some offhand techniques (But then again, since the lua engine just came out, practically all techniques are experimental at the moment) I'll post what I have once I get decently through into it.


thanks, make it as simple as posible because i dont know much about it, and NTD, im sure someone will help you

alt Re: Lua Scripting:Help!

Lee
Moderator Off Offline

Zitieren
NTD hat geschrieben
ok thx for that but now i need to replace the samples/"luamod.lua" with mod2d/mods?
or what?


I've changed the name of the director to amx2d so it'll be at

sys/lua/amx2d/main.lua

In addition to that, you will also need to initialize the mod, so the code will be

∗
1
2
dofile("sys/lua/amx2d/main.lua")
main("sys/lua/amx2d")
∗

Also, if you have multiple mod files, starting with the next release you'll be able to have a second parameter to specify which mod you want on.

Zitat
thanks, make it as simple as posible because i dont know much about it, and NTD, im sure someone will help you


Will do
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht