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 2220 221 222338 339 Next To the start

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
@Nemesis: no, that's not possible. It also doesn't make sense because the human team only wins when the round time is over. they would never win with unlimited roundtime.

@brk753951: that's very simple
1
2
3
4
5
6
7
8
9
10
11
12
13
14
minutecounter=0

addhook("startround","start")
function start()
	minutecounter=0
end

addhook("minute","minute")
function minute()
	minutecounter=minutecounter+1
	if (minutecounter>=30) then
		parse("restart")
	end
end

old Re: Lua Scripts/Questions/Help

Jermuk
User Off Offline

Quote
DC has written
1
2
3
4
5
6
7
8
9
10
minutecounter=0

addhook("minute","minute")
function minute()
	minutecounter=minutecounter+1
	if (minutecounter>=30) then
		minutecounter = 0 --   <------------------
		parse("restart")
	end
end


So would be a little shorter.

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
can anyone help or not?

I need a script when you press like a button called hm1
then a menu shows up

and a script when you walk over X 1000 and Y 1000 you die

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
give me script for more money then 16000$(virualmoney) and i can drop it and pickup
and i need Payday Script 500money per minute

old Re: Lua Scripts/Questions/Help

brk753951
BANNED Off Offline

Quote
hello i need one menu.

menu
-----
1-medikit(give 100healt. price is 100dollar)
2-.... (i write other here. ineed only see how to make this :D)
3-.....
4-......
5-.......
7-.....
8-....
9-nextpage

2.page
----
i need admin panel and make this usgn)(only admin and other usgn)
1-teleport ..x....y....(i write x and y
2-max healt 250
3-give laser and super armor
4-.....
5.....
ineed this pls

and thanks admin and other because all help

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
try this

1
2
3
4
5
6
7
8
9
10
11
addhook("team","name_team")
function name_team(id)
pname = player(id,"name")
     if (player(id,"team") == 2) then
          parse("setname "..id.." [CT]"..pname)
     elseif (player(id,"team") == 1) then
          parse("setname "..id.." [TT]"..pname)
     elseif (player(id,"team") == 0) then
          parse("setname "..id.." [SPEC]"..pname)
     end
end

But this has some bugs when you join TT your name will be [TT][SPEC]NAME

and so on imma work on it

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
@vesa-omar
1
2
3
4
5
6
t = ""
for word in string.gmatch("[TT] some name", "%s.+") do
	t = t..word
end
t = t:sub(2, t:len())
print(t)

Use that to help you get there name. Just put a space between [TT]/[CT]/[SPEC] and the players name.

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
You can use virtual money (initArray) , sry i cant write here script , i in mobile telephone (my network is repair)

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
You don't really need initArray, but you should set the values.
1
2
3
4
money_array = {}
for i = 1, 32 do
	money_array[i] = player(i, "money") or 0
end

old realistic car turn

CeLiL_CaN
User Off Offline

Quote
I want to realistic car turn...
Weiwen maked a lua but it not realistic...
IMG:https://img828.imageshack.us/img828/9784/example.jpg

× Red line weiwens script...
√ i want Green line..

Like real car...

A man maked it but i dont remember hid name.

Are you make it?

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
IVe been posting this 3 times now and no help omg

I need a script when you press like a button called hm1
then a menu shows up

and a script when you walk over X 1000 and Y 1000 you die
To the start Previous 1 2220 221 222338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview