Forum

> > CS2D > Scripts > Once restart on map!
Forums overviewCS2D overview Scripts overviewLog in to reply

English Once restart on map!

47 replies
Page
To the start Previous 1 2 3 Next To the start

old Re: Once restart on map!

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
restarted = false

addhook("startround","restartonce")
function restartonce(id)
	if not restarted then
		timer(200,"parse","restart")
		restarted = true
	end
end

Place it in the map Lua file.

old Re: Once restart on map!

Deleted User

Quote
user EngiN33R has written
1
2
3
4
5
6
7
8
9
restarted = false

addhook("startround","restartonce")
function restartonce(id)
	if not restarted then
		timer(200,"parse","restart")
		restarted = true
	end
end

Place it in the map Lua file.


I hate you -.-

old closed Re: Once restart on map!

Yates
Reviewer Off Offline

Quote
user Infinite Rain has written
I hate you -.-

Why you mad at Engipoo?

@Mods and DC, I'm not insulting Engi, I decided to call him that from now on :3
edited 1×, last 02.03.12 08:39:58 pm

Admin/mod comment

No you won't.

old Re: Once restart on map!

Deleted User

Quote
But you can do that code in one line:
1
timer(200,"parse","restart")

do the same thing.
Script will be readed once after map change. Same effect.

old Re: Once restart on map!

Deleted User

Quote
It's not. But CS2D start reading script on first round.

Tested: Same thing as yours, but mine one is starting on very first round
edited 1×, last 02.03.12 10:55:53 pm

old Re: Once restart on map!

EngiN33R
Moderator Off Offline

Quote
CS2D reads a script as soon as it's executed. Assuming user Suprise has it in server.lua, it's executed after the server is started, but not after the start of the first round.

old Re: Once restart on map!

Suprise
BANNED Off Offline

Quote
Yeaa. Im wrong.. First round script doesnt work. Just when I write /restart.
So doesnt work. This is CS2D bug or impossible script?

old Re: Once restart on map!

sheeL
User Off Offline

Quote
user Suprise has written
Its a dedicated server and I dont want always play on server -.-


/restart = ping server
/rcon restart = enable rcon
To the start Previous 1 2 3 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview