Forum

> > CS2D > Scripts > Script not working. (random map choice)
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script not working. (random map choice)

4 replies
To the start Previous 1 Next To the start

old Script not working. (random map choice)

muxarus
User Off Offline

Quote
Hi us nrealSoftWare! Today i got an new idea to make Disasters server where players need to survival in random map! But my code wont to work . So there is code:

Spoiler >
edited 1×, last 05.03.15 07:33:11 pm

old Re: Script not working. (random map choice)

RedizGaming
GAME BANNED Off Offline

Quote
@user muxarus:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
maps = {
	[1] = {
		name = "zombieApocalypse",
		x=10,
		y=10,
	},
	[2] = {
		name = "Flood",
		x=20,
		y=20,
	},
	[3] = {
		name = "ebola",
		x=30,
		y=30,
	},
	[4] = {
		name = "combine_invasion",
		x=40,
		y=40,
	}
}

color = {
	[1] = 169255220,
	[2] = 169255255,
	[3] = 169255000,
	[4] = 169000255,
	[5] = 169000000,
	[6] = 169220220,
	[7] = 169064179,
	[8] = 169255025,
	[9] = 169050150,
	[10] = 169100100,
	}
}

addhook("spawn","_start")
function _start(id)
	getmap = math.random(1,4)
	getcolor = math.random(1,10)
	currentmap = maps[getmap].name
	currentmapX = maps[getmap].x
	currentmapY = maos[getmap].y
	timer(1000,"msg","MAP WILL BE CHOISED IN 3 SECONDS")
	timer(2000,"msg","MAP WILL BE CHOISED IN 2 SECONDS")
	timer(3000,"msg","MAP WILL BE CHOISED IN 1 SECONDS")
	timer(4000,"msg","MAP CHOISED ©"..getcolor.." "..maps[getmap].name.." ")
parse("setpos "..id.." "..currentmapX.." "..currentmapY)
end

you can try to use it

old Re: Script not working. (random map choice)

RedizGaming
GAME BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
maps = {
	[1] = {
		name = "zombieApocalypse",
		x = 10,
		y = 10,
	},
	[2] = {
		name = "Flood",
		x = 20,
		y = 20,
	},
	[3] = {
		name = "ebola",
		x = 30,
		y = 30,
	},
	[4] = {
		name = "combine_invansion",
		x = 40,
		y = 40,
	}
}

color = {
	[1] = 169255220,
	[2] = 169255255,
	[3] = 169255000,
	[4] = 169000255,
	[5] = 169000000,
	[6] = 169220220,
	[7] = 169064179,
	[8] = 169255025,
	[9] = 169050150,
	[10] = 169100100,
}

addhook("spawn","_start")
function _start(id)
	local getmap = math.random(1,4)
	local getcolor = math.random(1,10)
	local currentmap = maps[getmap].name
	local currentmapX = maps[getmap].x
	local currentmapY = maps[getmap].y
      timer(1000,"msg","MAP WILL BE CHOISED IN 3 SECONDS")
      timer(2000,"msg","MAP WILL BE CHOISED IN 2 SECONDS")
      timer(3000,"msg","MAP WILL BE CHOISED IN 1 SECONDS")
      timer(4000,"msg","MAP CHOISED ©"..getcolor.." "..maps[getmap].name.." ")
	timer(5000,"parse","setpos "..id.." "..currentmapX.." "..currentmapY.." ")
end

Now try to use it
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview