Forum

> > CS2D > Scripts > Script with "Second"
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Script with "Second"

25 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: Script with "Second"

J4x
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---VARIABLES---

min_dis = 3
dis = 0
---------

addhook("minute","rand_dis")

function rand_dis()
     dis = dis + 1
     if dis == min_dis then
          dis = 0
          rand_dis1 = 1
     end
end

alt Re: Script with "Second"

Kostyan1996
User Off Offline

Zitieren
Oh, thanks and sorry, if I didn't understand you right in last message (I'm not english-speaking and can't understand all of your words and offers)...
---
Hm, make this, but script won't work though...
1× editiert, zuletzt 27.06.12 09:00:04

alt Re: Script with "Second"

EngiN33R
Moderator Off Offline

Zitieren
Well, for me user J4x's code works on a smaller scale (with a second hook), so I don't see why it wouldn't work on its proper scale.

alt Re: Script with "Second"

EngiN33R
Moderator Off Offline

Zitieren
You need to declare the function before calling it.

1
2
3
4
5
6
7
8
9
10
11
12
test()

function test()
	print("Test")
end
--The above won't work
--This, however, will:
function test()
	print("Test")
end

test()
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht