Forum
CS2D Scripts Lua Scripts/Questions/Help 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
--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...
(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. /DCHow ?!
That's 9 classes:
here the script i donot know what wrong i add 2 more classes but all classes like the class number 1 why ???
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
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
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
even though i use /equip 1 59 it didn't work
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 ???
here the script i donot know what wrong i add 2 more classes but all classes like the class number 1 why ???
this is how i did it, with a bit more OOP approach
edited 1×, last 27.12.09 03:48:44 pm
change names ?? could you explain it better,so i can give you a better function
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?