Forum

> > CS2D > Scripts > if player exits.. (lua)
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch if player exits.. (lua)

9 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt geschlossen if player exits.. (lua)

limonata
User Off Offline

Zitieren
Hi all i was making a script but i need a help about this. Please check this codes.

1
2
3
4
5
6
7
8
9
10
11
if cmd == "!goto" then
		if player(pl,"exits") then
	   if pl ~= nil and pl ~= id then
			parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
		else
			msg2(id,string.char(169).."255255000Correct syntax: !goto <id>")
			end
			else
			msg2(id,"No target!")
		end	
	end

It says all time "No target!" when i used !goto <id>

please help.

alt Re: if player exits.. (lua)

Rainoth
Moderator Off Offline

Zitieren
user limonata hat geschrieben
Hi all i was making a script but i need a help about this. Please check this codes.

1
2
3
4
5
6
7
8
9
10
11
if cmd == "!goto" then
		if player(pl,"exits") then
	   		if pl ~= nil and pl ~= id then
				parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
			else
				msg2(id,string.char(169).."255255000Correct syntax: !goto <id>")
			end
		else
			msg2(id,"No target!")
		end	
	end

It says all time "No target!" when i used !goto <id>

please help.

Maybe because it has to check if player "exists" not "exits"

Always check the grammar.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht