Forum

> > CS2D > Scripts > Set round time
Forums overviewCS2D overview Scripts overviewLog in to reply

English Set round time

24 replies
Page
To the start Previous 1 2 Next To the start

old Re: Set round time

C0nan
User Off Offline

Quote
No! i wanna lua script
and you can ad it to this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Spawn Equip by Unreal Software   --

if sample==nil then sample={} end
sample.spawnequip={}

sample.spawnequip.itemlist="1";

--------------------------------------
-- SPAWN                            --
--------------------------------------
addhook("spawn","sample.spawnequip.spawn")
function sample.spawnequip.spawn()
	return sample.spawnequip.itemlist;
end

I wanna make map without buy zone, so i must give player weapon and i must set round time

old Re: Set round time

Yates
Reviewer Off Offline

Quote
Any line.

Example;
1
2
3
4
5
Random code here

parse("mp_roundtime 20")

More random code here
Script will set roundtime to 20 every map change or script restart.

old Re: Set round time

C0nan
User Off Offline

Quote
It soesn't work, i opened console and saw this:
ERROR: Unknown command 'mp_roundtime 20' (mp_roundtime 20)

old Re: Set round time

sheeL
User Off Offline

Quote
user C0nan has written
It soesn't work, i opened console and saw this:
ERROR: Unknown command 'mp_roundtime 20' (mp_roundtime 20)


example :
1
2
3
4
5
function _minute()
parse('mp_roundtime 20')
end

addhook("minute","_minute")

old Re: Set round time

C0nan
User Off Offline

Quote
LUA ERROR: maps/cmpgn_1_mission1.lua:20: '<name>' expected near ' ' - Doesn't work
I tried that:
1
2
3
4
5
function _minute()
parse('mp_roundtime 20')
end

addhook("minute","_minute")

And that:
1
2
3
4
addhook("minute","_minute")
function _minute()
parse('mp_roundtime 20')
end

old Re: Set round time

Suprise
BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- Spawn Equip by Unreal Software   --
parse("mp_roundtime 20")

if sample==nil then sample={} end
sample.spawnequip={}

sample.spawnequip.itemlist="1";

--------------------------------------
-- SPAWN                            --
--------------------------------------
addhook("spawn","sample.spawnequip.spawn")
function sample.spawnequip.spawn()
     return sample.spawnequip.itemlist;
end

Quote
LUA ERROR: maps/cmpgn_1_mission1.lua:20: '<name>' expected near ' ' - Doesn't work


Show me the map script.

old Re: Set round time

C0nan
User Off Offline

Quote
I don;t know whar you are talking about. Map is named the same as lua file. Spawn equip is working, but when i paste this nothing is correct:
function _minute()
parse('mp_roundtime 20')
end
addhook("minute","_minute")
OR
addhook("minute","_minute")
function _minute()
parse('mp_roundtime 20')
end

old Re: Set round time

C0nan
User Off Offline

Quote
Now nothing i working Maybe that 2 scripts is working wrong together

old Re: Set round time

Suprise
BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
parse("mp_roundtime 20")

itemlist = "1"

addhook("spawn","_spawn")
function _spawn()
	return itemlist;
end

Tested, works.

old Re: Set round time

C0nan
User Off Offline

Quote
Only that?? I tested it on de_dust but still round time is 10 minutes, not 20
LUA ERROR: maps/de_dust.lua:3: '=' expected near ' '
I want it only for 1 map, not for server

old Re: Set round time

EndDead
User Off Offline

Quote
user C0nan has written
Only that?? I tested it on de_dust but still round time is 10 minutes, not 20
LUA ERROR: maps/de_dust.lua:3: '=' expected near ' '
I want it only for 1 map, not for server

dunno 'bout the time, but for a map...
1
2
3
4
5
6
7
8
9
10
parse("mp_roundtime 20")

itemlist = "1"

addhook("spawn","_spawn")
function _spawn()
	if map('name') = de_dust then -- << MAP NAME
		return itemlist;
	end
end

PS. not sure if its right, i failed at scriptin btw..
PS. this is user Suprise script that he posted above, but i added the 'map checker' thingy...

old Re: Set round time

sheeL
User Off Offline

Quote
user C0nan has written
Not working
Can i paste it into maps\de_dust.LUA?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("spawn","checker")
function checker()
local mapper=map("name")
if mapper == "de_dust" then -- YOUR MAP NAME--
cab()
else
return 0
end
end

function cab()
parse("mp_roundtime 20")
return 1
end

Tested... and Works..

old Re: Set round time

C0nan
User Off Offline

Quote
LUA ERROR: maps/de_dust.lua:2: '<name>' expected near ' ' AGAIN I know it's hard but pls help

old Re: Set round time

sheeL
User Off Offline

Quote
user C0nan has written
LUA ERROR: maps/de_dust.lua:2: '<name>' expected near ' ' AGAIN I know it's hard but pls help


I tested and works...
put all code of your script here ...
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview