Forum

> > CS2D > Scripts > Staff Spawn point
Forums overviewCS2D overview Scripts overviewLog in to reply

English Staff Spawn point

12 replies
To the start Previous 1 Next To the start

old Staff Spawn point

Bapke
User Off Offline

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

old Re: Staff Spawn point

Bapke
User Off Offline

Quote
user Dynamite07 has written
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...

old Re: Staff Spawn point

Rainoth
Moderator Off Offline

Quote
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.

old Re: Staff Spawn point

Avo
User Off Offline

Quote
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.

old Re: Staff Spawn point

Marcell
Super User Off Offline

Quote
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

old Re: Staff Spawn point

Bapke
User Off Offline

Quote
@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"
edited 1×, last 24.04.14 04:26:04 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview