Forum

> > CS2D > Scripts > Setpos
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Setpos

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Setpos

zazz
User Off Offline

Zitieren
Hello, i'm trying to change some spawns for an event editing a script
New Spawns: TT = 29/243, CT = 56/225..

But i don't know how to do it here.. can anyone do it for me?
1
2
3
4
5
6
7
8
9
10
11
parse('trigger '..triggers.warzone[i])
      end
      for k,v in pairs (player(0,"tableliving")) do
         if player(v,"team") == 1 then
            parse("setpos "..v.." 5520 "..math.random(54,65)*32+16)
         else
            parse("setpos "..v.." 6384 "..math.random(54,65)*32+16)
         end
      end
    end
end

I think the first setpos is for the terrorist team, idk, this is confusing

alt Re: Setpos

Cure Pikachu
User Off Offline

Zitieren
user zazz hat geschrieben
I think the first setpos is for the terrorist team

You are right. The second is for the CTs (since Spectators are considered dead and therefore not in the
player(0,"tableliving")
table)
user zazz hat geschrieben
TT = 29/243, CT = 56/225

Is that the X and Y coordinates?

alt Re: Setpos

Cure Pikachu
User Off Offline

Zitieren
OK, at this point it's quite easy, calculator and cs2d cmd setpos are your friends here:
1
2
3
4
5
6
7
for k,v in pairs(player(0,"tableliving")) do
	if player(v,"team") == 1 then
		parse("setpos "..v.." 944 7792")
	else
		parse("setpos "..v.." 1808 7216")
	end
end
Replace your line 3-9 with that.
2× editiert, zuletzt 25.07.18 16:36:10

alt Re: Setpos

zazz
User Off Offline

Zitieren
@user Cure Pikachu: Oh wow you made it look so simple, i'm surprised lol.
It's working, thanks alot

By the way, would you mind if i ask you something in PM?

alt Re: Setpos

Cure Pikachu
User Off Offline

Zitieren
user zazz hat geschrieben
By the way, would you mind if i ask you something in PM?

Sure. Don't count on me being able to fulfill things though.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht