Forum

> > CS2D > Scripts > Spawn on Pos Lua
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Spawn on Pos Lua

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Spawn on Pos Lua

Egoist
User Off Offline

Zitieren
i want some lua if someone has the right usgn id,to give them an option in F2 to spawn normally,or a pos i set.


F2>Spawn

You will now spawn normally.

You will now spawn on your house.

alt Re: Spawn on Pos Lua

Rainoth
Moderator Off Offline

Zitieren
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
tbl = {99999}
isfine = {}

addhook("join","whoiswho")
function whoiswho(id)
	isfine[id]=0
end

addhook("serveraction","makefine")
function makefine(id,b)
	if b == 1 then
		for _,usgn in ipairs(tbl) do
			if player(id,"usgn")==usgn then
				if isfine[id]==0 then
					isfine[id]=1
					msg2(id,"Your text here")
				elseif isfine[id]==1 then
					isfine[id]=0
					msg2(id,"Your text here")
				end
			end
		end
	end
end

addhook("spawn","magic")
function magic(id)
	if isfine[id]==1 then
		timer(1000,"parse","setpos "..id.." 999 999")
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht