Forum

> > CS2D > Scripts > Set round time
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Set round time

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

alt Re: Set round time

C0nan
User Off Offline

Zitieren
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

alt Re: Set round time

Yates
Reviewer Off Offline

Zitieren
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.

alt Re: Set round time

C0nan
User Off Offline

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

alt Re: Set round time

sheeL
User Off Offline

Zitieren
user C0nan hat geschrieben
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")

alt Re: Set round time

C0nan
User Off Offline

Zitieren
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

alt Re: Set round time

Suprise
BANNED Off Offline

Zitieren
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

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


Show me the map script.

alt Re: Set round time

C0nan
User Off Offline

Zitieren
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

alt Re: Set round time

C0nan
User Off Offline

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

alt Re: Set round time

Suprise
BANNED Off Offline

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

itemlist = "1"

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

Tested, works.

alt Re: Set round time

C0nan
User Off Offline

Zitieren
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

alt Re: Set round time

EndDead
User Off Offline

Zitieren
user C0nan hat geschrieben
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...

alt Re: Set round time

sheeL
User Off Offline

Zitieren
user C0nan hat geschrieben
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..

alt Re: Set round time

C0nan
User Off Offline

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

alt Re: Set round time

sheeL
User Off Offline

Zitieren
user C0nan hat geschrieben
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 ...
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht