Forum

> > CS2D > Scripts > Staff Spawn point
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Staff Spawn point

12 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Staff Spawn point

Bapke
User Off Offline

Zitieren
How can I make that admin/mod/member... spawn in adm/mod/memb house?

alt Re: Staff Spawn point

Bapke
User Off Offline

Zitieren
user Dynamite07 hat geschrieben
What? How do you expect us to know what mod and map you are talking about.

Sry,im talking about deathmatch,happy town. I need Staff to spawn in staff house not in normal spawn place...

alt Re: Staff Spawn point

Rainoth
Moderator Off Offline

Zitieren
Make a table. Put all admins usgns there.On spawn loop the table. Check if player's usgn is equal to admin's usgn. If it is, setpos them inside the staff house.

alt Re: Staff Spawn point

Avo
User Off Offline

Zitieren
I'm sleepy but try this one:
1
2
3
4
5
6
7
8
9
IsAdmin = {
	[88318] = true
}
AdminSpawn = {0, 0} -- x and y position (in tiles) where admins will be spawned
HookSpawn = function(id)
	if IsAdmin[player(id, "usgn")] then
		parse("setpos "..id.." "..(AdminSpawn[1] * 32 + 16).." "..(AdminSpawn[2] * 32 + 16))
	end
end
Note: it's not tested.

alt Re: Staff Spawn point

Marcell
Super User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- Created By Salad Fingers --
--    on 2014.02.03 21:16   --

admins = {6943} -- Put staff's usgn here
stuff_x = 500 -- Cordinate X
stuff_y = 500 -- Cordinate Y

function table.contains(table, element)
    for key, value in pairs(table) do
        if value == element then
            return true
        end
    end
end

addhook("spawn","staff_spawn")
function staff_spawn(id)
if table.contains(admins,player(id,"usgn")) then
parse("setpos "..id.." "..stuff_x.." "..stuff_y.."")
end
end

My noob script!

Tested and works fine

alt Re: Staff Spawn point

Bapke
User Off Offline

Zitieren
@user Marcell:
It works but i think that something is wrong with cordinates,when i write them there (X,Y) it spawn me somewhere else,myb i cant find cordinates,i use it by
"Tile position 10l10"
1× editiert, zuletzt 24.04.14 16:26:04
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht