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 252 53 54338 339 Next To the start

old Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Quote
playa slaya has written
how can i make if you use a mine it does somthing?example: player uses a mine then changes name to whatever
just example

so how do i do this?

old Re: Lua Scripts/Questions/Help

New Rex
User Off Offline

Quote
Oh, Lee. I can't say no more. You simply ROCK AS HELL!!! !
THANKS! I have your little tut on a special document. And I downloaded the Lua stuff - it's so cool!
I use SCiTE, it has the syntax and stuff. It's a Lua plugin or something.
I knew you were so awesome as I think, my vote for you was the best thing I ever did here on Unreal software!
Now it is much easier to make and edit scripts!

@LilCoder: Hey, I see... although your sceipt is much organised, I tried it but give another different error...
IMG:https://img132.imageshack.us/img132/8281/luaerror1.jpg


But I'm really thankful. I'm in heaven!

old Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Quote
im trying to make where a admin is the only one able to do a thing so i tested it with this code and every time i type "admin" the game crashes and my computer does not respond to anything what is the problem

Spoiler >
edited 1×, last 13.09.09 04:02:25 am

old Re: Lua Scripts/Questions/Help

robdun
User Off Offline

Quote
I'm trying to make a climb server for cs2d. I got the mapping done. I just need a script where you can save your current location so when you die you can press a button and return to your last location.


Thanks
-robdun

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
playa slaya has written
im trying to make where a admin is the only one able to do a thing so i tested it with this code and every time i type "admin" the game crashes and my computer does not respond to anything what is the problem

Spoiler >


1
2
3
4
5
6
7
8
9
10
11
12
admins = {
	[28184]=true,
	}

addhook("say","admin_say")
function admin_say(id,text)
	if(text=="admin") then
		if admins[player(id,"usgn")] then	
			 msg("this is test")
		end
	end
end

You need to realize when you need a key/definition table and when you need a plain old mutable array

old Scripting... Need Help....

dre187killz
User Off Offline

Quote
Hello to all those elite scripters
im in need of some help

i have a hard one for you....

need to make it
kinda like gungame but no

when u start u get a:
1. M4A1
2. 50 Armor
3. 1 HE
4. 1 Flash

Things I want included:
1. No Buying At All.
2. You Must have USGN Account
3.No Dropping When you Die

Things that are Most Important
1. Every 5 People You Kill You Get
2 Health For Killing And Ur Max Health Up 1

Example:

Start Health 100

Lets Say 1 Vs 1

Both Start 100 Health

Brett Kills Henry with 17 Health Left
he should go up to 19 and Max Hp should be 101
and when you die it resets back to 100

and 1 more question
1
2
how do i change the Damage of a weapon?
or is this a lua script to?

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Thats console command:
Mp_wpndmg <weapon name> <damage>

But also you can change damage with script.

Its enoying then ppl are so selfish with requests...
Anyway, I guess LIlcoder is still bored...I guess he will make it. lol

old Selfish?

dre187killz
User Off Offline

Quote
1
2
3
4
5
6
7
Thats console command: 
Mp_wpndmg <weapon name> <damage> 

But also you can change damage with script. 

Its enoying then ppl are so selfish with requests... 
Anyway, I guess LIlcoder is still bored...I guess he will make it. lo



what do you mean i am selfish? i asked for a script
cus i have no idea how to do it
and wtf is a console command??

old Re: Lua Scripts/Questions/Help

KimKat
GAME BANNED Off Offline

Quote
Here's my solution, I'm still learning lua.
On start of each round the damages on the weapons will be set.

1
2
3
4
5
6
7
addhook("startround","roundstart")
function roundstart()
	parse("mp_wpndmg Knife 10")--from 25 (default) dmg to a custom 10 dmg.
	parse("mp_wpndmg AWP 15")--Damage with no zoom.
	parse("mp_wpndmg_z1 AWP 30")--Half zoom damage.
	parse("mp_wpndmg_z2 AWP 60")--Full zoom damage.
end

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Go controls > there is menus section and console key...
So its actualy same console as in valve's CS.

Im not saying that you are selfish...
There are to many people who wants to get script without working (and later use it as his own script), that I call selfish.

@kimkat
You can parse it without hook...
So then it will be parsed after launching server.
edited 1×, last 13.09.09 12:24:53 pm

old Re: Lua Scripts/Questions/Help

dre187killz
User Off Offline

Quote
is there a way to make it

so there is 5 rounds?

each round u start u get diffrent items?


Update Post:

1
2
Im not saying that you are selfish... 
There are to many people who wants to get script without working (and later use it as his own script), that I call selfish.

i am not looking to take credit for anything you shouldnt jugde me by the cover u should read the pages inside and ull see i am not like that

and its for Personal Use for now
cus i cant host and dont want 2 my net gets shut off at 12 am so i cant play online so i can play with bots at nighttime and ive tryd and tryd to make scripts i dont understand Lua and how things work
edited 1×, last 13.09.09 12:42:57 pm

old Re: Lua Scripts/Questions/Help

LilCoder
BANNED Off Offline

Quote
Hmm I made the script,
but I don't really understand what you want

Spoiler >

old Re: Lua Scripts/Questions/Help

dre187killz
User Off Offline

Quote
do you i just save the spoiler thing
as name.lua or do i add it to another script?


Update Post:

Lilcoder u rox man thx a bunch
i advertise you all over forum in my signature
u made my nights very good

but i have 1 more question

ok my server is standard mode lets say its 1 vs 1
and the script u made with M4A1 Etc..

then 1 dies is there a way so the next round
it can be diffrent items?

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Weapon rounds, something like that?
Spoiler >

old Re: Lua Scripts/Questions/Help

dre187killz
User Off Offline

Quote
noo like
lets say 5 vs 5 we are T'S
and our team wins then
a new round should come

after you killed the 5 CT'S
then the round restarts and
we get new weapons
know wut i mean?


Update Post:
addhook("roundend","round_end")
function round_end(id)
return dont know how to say this but (When Every1 is dead on 1 team then round restarts) and new weapons you get
end
edited 2×, last 13.09.09 02:19:07 pm

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
dre187killz has written
after you killed the 5 CT'S
then the round restarts and
we get new weapons
know wut i mean?

Like team mode on gun game?
To the start Previous 1 252 53 54338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview