Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2123 124 125338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
perfectgamer2 has written
Hi i made my own equip lua but then it will msg but no equip?

--Night vision

addhook("say","spawn7")
function spawn7(id,txt)
if(txt=="!nv") then
msg(""..player(id,"name").." He can see in the dark ")
parse("equip "..id.." 59")
end
end
it works but can't equip "..id.." nightvision


If you check the console you will probably read
"ERROR: Strip - Cannot strip 59 - Night Vision (this would lead to problems)" or something like that.
Try returning 59 when you spawn a player, I don't know if that will work though...

old Re: Lua Scripts/Questions/Help

bassZ3N
User Off Offline

Quote
so hi all . can someone help my with one script , could you tell my how to make a script containing the map buttons like, you press button and you will get a car for the price it costs . and you have speed and car skin.... Like in roleplay server by vetti , so if you can help my i will be very thankful...

(P.S it's will be better if you will give me the code or script becouse im NOOB in scripting ) https://www.shout.ru/releases/devision_noob_frontcover.jpg" alt="IMG:https://t0.gstatic.com/images?q=tbn:T-98d1R_wA2m6M: https://www.shout.ru/releases/devision_noob_frontcover.jpg" border="0" style="margin: 5px 0px 5px 0px">

Admin/mod comment

whole text bold? pointless attention whore crap. don't do that. fixed. /DC

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
can any one tell me how to make the classes players more than 6(classes) i need good explanation if you give me a script with more off 6 classes players it would perfect !

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Please listen what Guenter13 said. Extend code.
That's 9 classes:
Spoiler >

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
omg it just never work
here the script i donot know what wrong i add 2 more classes but all classes like the class number 1 why ???

Spoiler >

old Re: Lua Scripts/Questions/Help

RAVENOUS
BANNED Off Offline

Quote
Argh has written
How can i make lua scripts?

You need some lua-skills to make lua-scripts.

Here a lua tutorial based on CS2D. Click meh!

To activate the lua script on your server edit this data:

sys/lua/server.lua
In the lua directory you can find samples, made by DC, which are showing you some little things you can make with lua.

Have fun making/editing lua stuff

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
@Argh
Hi i was like you on my first lua just go there and download some lua and learn from it (not copy it just learn) and try to make you own script even if it simple ,just when you make one even its simple that mean you go forward with lua.
and there is place where you can learn lua here some :
-www.lua.org
-this thread (you can ask any question about lua scripting)
-and there is a thread specially for Beginners byBlazzingxxclick clickhere
you can ask any qeustion you want on this thread i give you .

-Hope i tell you what you want to know

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
memo has written
-and there is a thread specially for Beginners byBlazzingxxclick clickhere

That thread was to announce that Blazzingxx was going to make a tutorial for lua, not to ask newbie questions

old Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Quote
memo has written
omg it just never work
here the script i donot know what wrong i add 2 more classes but all classes like the class number 1 why ???

Spoiler >



this is how i did it, with a bit more OOP approach

Spoiler >

old Help me

tengku4u
User Off Offline

Quote
How to change name for ct and t
edited 1×, last 27.12.09 03:48:44 pm

old Lua bug?

Happy Camper
User Off Offline

Quote
I discovered this when I tried to replace the original addhook function with my own (it's a long story...). I did like this:

Spoiler >


When I call addhook, both my_addhook and CS2D's original addhook get called. Isn't this kind of...wrong? I would expect only my_addhook to be called or am I mistaken?

old No Lua bug

Happy Camper
User Off Offline

Quote
Hmm, it seems to be working now. I have no idea why it didn't work before.
To the start Previous 1 2123 124 125338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview