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 266 67 68338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
can someone tell me how to make a weapon menu for cts?And can someone help me with this code:

parse('hudtxt 0 "©000255000ZombieSwarm v3.0" 322 13 1')

The problem is that only the admin can see it and other players can`t see it.HELP!

old Help!!

craza424
User Off Offline

Quote
I made a script and I keep getting an error saying elseif to close to <eof>, Here the script bit thats affected...


elseif(text=="!No Bot") or (text=="!no bot") then
           if admins[player(id,"usgn")] then
parse("bot_remove_all)

          end     
     end     
end

Can someone put the fixed version on here, I cannot get the dam thing to work at all!

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
redefinder has written
And can someone help me with this code:

parse('hudtxt 0 "©000255000ZombieSwarm v3.0" 322 13 1')

The problem is that only the admin can see it and other players can`t see it.HELP!

You should parse hudtext after player is joining game...
Otherwise he wont see it


@craza424, Give us full function... I guess there is something wrong with end count, use tabs!

old Re: Lua Scripts/Questions/Help

BetaM
User Off Offline

Quote
1
2
3
4
5
6
elseif(text=="!No Bot") or (text=="!no bot") then 
           if admins[player(id,"usgn")] then 
parse("bot_remove_all) 

          end      
     end
I think this should work. (you put too many ends)

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
mat5b has written
1
parse([b]"[/b]bot_remove_all)

Look, its unfinished script, int.
There is many mistakes...

@craza424
Give us whole function, so we make it working.

old ....

craza424
User Off Offline

Quote
...@Blazzingxx, I can't give a whole function.....
...@mat5b, Sorry didn't work!

@Blazzingxx, Do you mean like this?... parse("bot_remove_all")??

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
craza424 has written
@Blazzingxx, Do you mean like this?... parse("bot_remove_all")??


Yes, thats better.

Why you cant give function?
No one will steal it because no one needs your script...

old Re: Lua Scripts/Questions/Help

playa slaya
COMMUNITY BANNED Off Offline

Quote
here this might work
1
2
3
4
5
6
7
8
9
local i
for i=1,32 do
elseif(text=="!No Bot") or (text=="!no bot") then
	if admins[player(i,"usgn")] then
		if (player(i,'bot')) and (player(i,'exists')) then
			parse('kick '..i)
		end
	end
end
EDIT: (if you cant give us whole function then it will be allot harder and we can't really fix it)
edited 2×, last 12.10.09 08:37:32 pm

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
playa slaya has written
here this might work
1
2
3
4
5
6
7
8
9
local i
for i=1,32 do
elseif(text=="!No Bot") or (text=="!no bot") then
	if admins[player(i,"usgn")] then
		if (player(i,'bot')) and (player(i,'exists')) then
			parse('kick '..i)
		end
	end
end
EDIT: (if you cant give us whole function then it will be allot harder and we can't really fix it)



I think this might work a little more

1
2
3
4
5
6
7
8
9
if(string.lower(text)=="!no bot") then
	if admins[player(i,"usgn")] then
		for i=1,32 do
			if (player(i,'bot')) and (player(i,'exists')) then
				parse('kick '..i)
			end
		end
	end
end

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
redefinder has written
@Blazzingx,How to do that?

1
2
3
4
addhook("team","teams")
function teams()
	parse('hudtxt 0 "©000255000ZombieSwarm v3.0" 320 15 1') 
end

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
redefinder has written
txn Blazzingx it worked Can you also tell me how to make weapon menu for cts?

I think so...

You should describe it very well, so I could make it 100% like you want.

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
I need to have weapon menu for cts and weapon menu for zombies if possible, i have zombie classes so when i press F2
classes menu shows up.
I used this code for classes:

function sample.zombie.classmenu(id)
     menu(id,"Select your Class,Random,Hidden,Fast,Fat,Iced,Explosive,Predator,Titan,Poison")     
end

function sample.zombie.startround()
     for i = 2,8 do
          if (player(i,"team")==2) then
               parse ("maket "..i)
          end
     end
end


So now i need weapon menus for cts like where you can buy mines,machete,heal potion,ect.And if possible for buying weapons instead of money to buy with zs points,like for example you get a zs point when ct kills zombie or when zombie kills ct the player that kills gets a zs point.

old Re: Lua Scripts/Questions/Help

Taner
User Off Offline

Quote
Hi. I need a simple lua script. However, I know nothing about programming. All I want is a script that will slowly restore the CT health to a certain number whenever it gets under 50.
Thanks.

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
redefinder has written
So now i need weapon menus for cts like where you can buy mines,machete,heal potion,ect.And if possible for buying weapons instead of money to buy with zs points,like for example you get a zs point when ct kills zombie or when zombie kills ct the player that kills gets a zs point.


I had relesed Zombie Plague 1.0
All those ideas are already there.

@Taner
1
2
3
4
5
6
7
8
9
10
11
addhook("second","sec")
function sec()
	local i
	for i = 1, 32 do
		if player(i,"exists") then
			if (player(i,'health') < 50) then
				parse('sethealth '..i..' '..player(i,'health') + 3)
			end
		end
	end
end
I hope you know what to do with code
edited 1×, last 13.10.09 09:33:09 pm

old Re: Lua Scripts/Questions/Help

Taner
User Off Offline

Quote
Thank you so much

just for Ct:

1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("second","sec")
function sec()
     local i
     for i = 1, 32 do
          if player(i,"exists") then
               if (player(i,'health') < 100) then
			   if (player(i,'team') == 2) then
                    parse('sethealth '..i..' '..player(i,'health') + 3)
               end
          end
     end
end 
end

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
This one better for CT:
Spoiler >

Btw, use tabs.

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
he used many spaces for "tabbing". this doesn't work here in the forum.
I have no problems with tabbing and I'm using vista. Long lines can become a bit confusing due to the automatic line-break/word-wrap/whatever but it works.
To the start Previous 1 266 67 68338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview