Forum

> > CS2D > Scripts > Give Admin CMD
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Give Admin CMD

18 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt geschlossen Give Admin CMD

superpegamento
User Off Offline

Zitieren
I need to say this word !give_admin [ID]
automatically add the user to the list of administrators
no need Functions for admin...

1
2
3
4
5
6
7
8
9
10
11
12
13
eg:

adms={}

addhook("say","say",317)
function say(id,t)
if t:sub(1,11)=="@dadm" then
local id=tonumber(t:sub(13))
table.insert(adms,player(id,"usgn"))
msg2(id,player(id,"name").." promoted to ADM.")
msg2(id,"You have been promoted to ADM!")
end
end
5× editiert, zuletzt 03.07.13 01:05:42

alt Re: Give Admin CMD

EP
User Off Offline

Zitieren
that won't work because string.sub(TXT,1,5) will get only 5 characters from the put text... in that case (the command) , it will get only "!give" which is 5 chars long (1,5)..

make sure the substring is set correctly, let me correct it for you.. change t:sub(1,5) to t:sub(1,11) and then change t:sub(7) to t:sub(13)

remember that this script will TEMPORALLY make admins, because that table will be reset to default after you close the server.. you should implement an input/output system that saves your admins to a file blablabla

alt Re: Give Admin CMD

superpegamento
User Off Offline

Zitieren
user EP hat geschrieben
that won't work because string.sub(TXT,1,5) will get only 5 characters from the put text... in that case (the command) , it will get only "!give" which is 5 chars long (1,5)..

make sure the substring is set correctly, let me correct it for you.. change t:sub(1,5) to t:sub(1,11) and then change t:sub(7) to t:sub(13)

remember that this script will TEMPORALLY make admins, because that table will be reset to default after you close the server.. you should implement an input/output system that saves your admins to a file blablabla



thenks!
but I'm looking for that exactly
one that I save data from admin
2× editiert, zuletzt 03.07.13 01:06:27

alt Re: Give Admin CMD

Homura Kami
User Off Offline

Zitieren
Don't forgot to add nil valus to you lua
For you lua use these nil(i hope it work) or you lua don't have index
Spoiler >

and change you addhook to
Spoiler >

and you function to
Spoiler >

becuz only adms is you index in nil
Other psart i just going to say IDK
and most important part is too add someting in adms command it look like these
Spoiler >

and i will work like these(if all part work correct)
Spoiler >
1× editiert, zuletzt 03.07.13 01:25:53

alt Re: Give Admin CMD

Xirot
User Off Offline

Zitieren
user Chingy:
Zitat
Probaly

Shit.
Well , you just respond when I make a comment otherwise you'll never comment.
Spoiler >
1× editiert, zuletzt 03.07.13 13:26:52

alt Re: Give Admin CMD

Dartex
User Off Offline

Zitieren
user Chingy hat geschrieben
@user Xirot: Something called Brain. You probaly never had one.

the only one who haven't got Brain are plants , there is no point of your comment.

alt Re: Give Admin CMD

Rainoth
Moderator Off Offline

Zitieren
user Dartex hat geschrieben
user Chingy hat geschrieben
@user Xirot: Something called Brain. You probaly never had one.

the only one who haven't got Brain are plants , there is no point of your comment.


Oh the irony.

@user Xirot: I'm a BIT similar to google. I see keywords then ASSUME what the person wants. I don't really know if that's what he needs and/or if I understood it correctly, while google takes keywords and then just searches for the most searched sites.
Except* Sunshine* (and I'll assume you tried to recite some kind of poem)
@user Homura Kami: I doubt that will work.
P.S. you forgot an "if"

alt Re: Give Admin CMD

Homura Kami
User Off Offline

Zitieren
Sorry i am newbie so i don't know everything about addhook but for me i will try my best to help other people

alt Re: Give Admin CMD

Shawni
User Off Offline

Zitieren
user Dartex hat geschrieben
user Chingy hat geschrieben
@user Xirot: Something called Brain. You probaly never had one.

the only one who haven't got Brain are plants , there is no point of your comment.

Animals don't have brains.

alt Re: Give Admin CMD

Xirot
User Off Offline

Zitieren
user Shawni: You are talking about yourself? I agree.
Spoiler >

alt Re: Give Admin CMD

Shawni
User Off Offline

Zitieren
user Xirot hat geschrieben
user Shawni: You are talking about yourself? I agree.
Spoiler >

Hey, You 14years old skid, I don't have problems with you.
But, Seriously animals don't have brains.

alt Re: Give Admin CMD

Chingy
User Off Offline

Zitieren
@user Xirot: You're just a conceited, arrogant 14 years old girl. We got enough of them in German citys. And you act even more worse. Congratz.
Btw: I have holidays therefore I have a lot of time since I won't be in Russia this summer.

@user Shawni: You probaly didn't understood my comment before. Therefore you have to be a plant. A very genious one.

alt Re: Give Admin CMD

Shawni
User Off Offline

Zitieren
user Chingy hat geschrieben
@user Xirot: You're just a conceited, arrogant 14 years old girl. We got enough of them in German citys. And you act even more worse. Congratz.
Btw: I have holidays therefore I have a lot of time since I won't be in Russia this summer.

@user Shawni: You probaly didn't understood my comment before. Therefore you have to be a plant. A very genious one.

Loled and still, I understood your comment and my message was to user Dartex:

alt Re: Give Admin CMD

Xirot
User Off Offline

Zitieren
user Chingy: You have no reason to say that I'm a girl or I don't know what are you saying.
You talk to say nothing you just want to reply.
user Shawni: Keep back b*tch.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht