Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Spawn trable
8 Antworten![Zum Anfang](img/i_first.png)
![Vorherige](img/i_prev.png)
![Nächste](img/i_next.png)
![Zum Anfang](img/i_last.png)
1
2
3
4
5
6
2
3
4
5
6
addhook("spawn","_spawn") function _spawn(id) 	if id == 1 then 		parse("setpos 1 xhere yhere") --x and y are in pixels 	end end
1
2
3
4
5
6
2
3
4
5
6
addhook("spawn","_spawn") function _spawn(id) if id == 1 then parse("setpos 1 x "5344" y "512"") end end
But in the console gives this error: LUA ERROR: maps/ch_!prolog.lua:45: ')' expected near '5344'
what wrong?
1
2
3
4
5
6
2
3
4
5
6
addhook("spawn","_spawn") function _spawn(id) if id == 1 then parse("setpos 1 5344 512") end end
1
2
3
4
2
3
4
x = 5 y = 532 parse("setpos 1 "..x.." "..y)
Else, what @
![user](img/i_friend.png)
1× editiert, zuletzt 15.01.13 20:40:59
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("spawn","_spawn") function _spawn(id) if id == 1 then x = 512 y =5344 	parse("setpos 1 "..x.." "512" "..y.." "5344") end end
but the previous error...
p.s. Yes I don't know scripts
pp.s Yes, I mixed up x and y.
[edited]
it works, thanks. only caused an error in another script, the script uploads the specified image 4 times, because of what the screen was very dark.
1× editiert, zuletzt 15.01.13 18:32:31
![cs2d cmd](img/i_codehelp.png)
![user](img/i_friend.png)
And can u make ,witch usgn id?
1
if player(id,"usgn") == 12345 then
![Zum Anfang](img/i_first.png)
![Vorherige](img/i_prev.png)
![Nächste](img/i_next.png)
![Zum Anfang](img/i_last.png)