Forum
Scripts
Spawn trable
Spawn trable
8 replies
1

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 @
Jynxxx: meant is that you should have replaced xhere yhere with numbers, nothing more. edited 1×, last 15.01.13 07:40:59 pm
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.
edited 1×, last 15.01.13 05:32:31 pm
setpos
NeverLast has writtenAnd can u make ,witch usgn id?
1
if player(id,"usgn") == 12345 then
1

Offline