Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 2123 124 125338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
perfectgamer2 hat geschrieben
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...

alt Re: Lua Scripts/Questions/Help

bassZ3N
User Off Offline

Zitieren
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" width="1" height="1" onLoad="handleImg(this);">

Admin/Mod Kommentar

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

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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 !

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

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

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
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 >

alt Re: Lua Scripts/Questions/Help

RAVENOUS
BANNED Off Offline

Zitieren
Argh hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
@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

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
memo hat geschrieben
-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

alt Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Zitieren
memo hat geschrieben
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 >

alt Help me

tengku4u
User Off Offline

Zitieren
How to change name for ct and t
1× editiert, zuletzt 27.12.09 15:48:44

alt Lua bug?

Happy Camper
User Off Offline

Zitieren
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?

alt No Lua bug

Happy Camper
User Off Offline

Zitieren
Hmm, it seems to be working now. I have no idea why it didn't work before.
Zum Anfang Vorherige 1 2123 124 125338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht