Forum

> > CS2D > Scripts > How to make admin...
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to make admin...

25 replies
Page
To the start Previous 1 2 Next To the start

moved How to make admin...

HiddenGlove
User Off Offline

Quote
I see all the V.I.P's and im wondering how you get to make someone a vip on your own server! HELP!

old Here?

Dovahkin
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
adminlist = {43653}

addhook("serveraction","hidden")
function hidden(id,a)
	for _,usgn in ipairs (adminlist) do
		if player(id,'usgn') == usgn then
			if a==1 then
				menu(id,"hole,hole")
			end
		      return 1
		end
	end
end
		--and the whole menu :)
edited 2×, last 18.04.11 08:21:57 am

old Re: How to make admin...

DannyDeth
User Off Offline

Quote
@Five/firetounge:
You have less Lua scripting skill than a dying ox.

@HiddenGlove:
Use the search function, a very good administration script is the HC Admin script, made by Happy Camper. LINK. It is seriously supreme.

old Re: How to make admin...

Yates
Reviewer Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
adminlist = {USGN}

addhook("say","admins")
function admins(id,txt)
for _, usgn in ipairs(adminlist) do
if player(id,'usgn') == usgn then
	msg("©255255255"..player(id,"name").." (Admin): "..txt)
return 1
end
end
end
This should work..
It should because I didn't make it, mwuaha.. (I fail)
edited 3×, last 17.04.11 06:16:33 pm

old Re: How to make admin...

DannyDeth
User Off Offline

Quote
You people are comparing normal numerical variables with arrays! Don't be stupid, how is that supposed to work?

old Re: How to make admin...

Starkkz
Moderator Off Offline

Quote
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
-- List of vips, separed by comma
VIP_Array = {}

function table.find(tab,val)
	for k, v in pairs(tab) do
		if v == val then
			return k
		end
	end
	return false
end

addhook("serveraction","SAction")
functon SAction(id,act)
	if table.find(VIP_Array,player(id,"usgn")) then
		-- He's a VIP
		if act == 1 then
			-- F2
		elseif act == 2 then
			-- F3
		elseif act == 3 then
			-- F4
		end
		-- Nothing else
	else
		-- He's not a VIP
	end
end

old ?

Dovahkin
User Off Offline

Quote
I dont have time to script that Nigger danny!

old Re: How to make admin...

DannyDeth
User Off Offline

Quote
@Lee: he editted the post two times, the original code was the code written by FN_Linkin Park where he compares arrays and numerical values. Basically the one that Yates posted.

@Oxytamine:
I meant 'ox' as the animal, not the shortend version of your nick. Lol,

old LOL

Dovahkin
User Off Offline

Quote
Your Right i put the Return 1! my mistake

old Re: How to make admin...

DannyDeth
User Off Offline

Quote
And now he editted it again, and put the old code in. Sometimes I seriously doubt whether humanity has been getting more smart over more stupid.

old ?

Dovahkin
User Off Offline

Quote
I just edited it ones -.- noob nigger!

old Re: How to make admin...

DannyDeth
User Off Offline

Quote
Nigger?
I'm white as a dead man.

Maybe you should consider commiting suicide. Infact, don't even consider it, just do it.

old Re: How to make admin...

Yates
Reviewer Off Offline

Quote
Lol, does he know what he just said? "Noob nigger" Lol!
But ahhmm.. Are you saying the one I gave doesn't work? It should. Because I didn't make it
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview