English Give Admin CMD

18 replies
Goto Page
To the start Previous 1 Next To the start
02.07.13 10:12:41 pm
Up
superpegamento
User
Offline Off
I need to say this word !give_admin [ID]
automatically add the user to the list of administrators
no need Functions for admin...

Code:
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
edited 5×, last 03.07.13 01:05:42 am
02.07.13 10:16:47 pm
Up
Xirot
User
Offline Off
Huh?
#Discord CS2D Rework - https://discord.gg/pbhdVdj
02.07.13 10:44:23 pm
Up
Rainoth
Moderator
Offline Off
file cs2d The Admin Script v4.0.2 Final (337)

I just wrote you the admin script which had most likes. I assumed that you wanted to get admin script.
03.07.13 12:44:31 am
Up
superpegamento
User
Offline Off
ssssssss
03.07.13 12:53:32 am
Up
EP
User
Offline Off
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
03.07.13 12:56:39 am
Up
superpegamento
User
Offline Off
user EP has written:
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
edited 2×, last 03.07.13 01:06:27 am
03.07.13 01:00:40 am
Up
Xirot
User
Offline Off
user Rainoth: How can you understand those peoples.
Seriously dude
#Discord CS2D Rework - https://discord.gg/pbhdVdj
03.07.13 01:18:26 am
Up
Homura Kami
User
Offline Off
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 >
edited 1×, last 03.07.13 01:25:53 am
03.07.13 01:20:24 am
Up
Chingy
User
Offline Off
@user Xirot: Something called Brain. You probaly never had one.
03.07.13 03:08:22 am
Up
Xirot
User
Offline Off
user Chingy:
Quote:
Probaly

Shit.
Well , you just respond when I make a comment otherwise you'll never comment.
Spoiler >
edited 1×, last 03.07.13 01:26:52 pm
#Discord CS2D Rework - https://discord.gg/pbhdVdj
03.07.13 03:12:13 am
Up
Dartex
User
Offline Off
user Chingy has written:
@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.
03.07.13 11:19:55 am
Up
Rainoth
Moderator
Offline Off
user Dartex has written:
user Chingy has written:
@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"
03.07.13 12:15:53 pm
Up
Homura Kami
User
Offline Off
Sorry i am newbie so i don't know everything about addhook but for me i will try my best to help other people
03.07.13 01:17:34 pm
Up
Shawni
User
Offline Off
user Dartex has written:
user Chingy has written:
@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.
We die once, do i have to hide to be visible ?
03.07.13 01:25:36 pm
Up
Xirot
User
Offline Off
user Shawni: You are talking about yourself? I agree.
Spoiler >
#Discord CS2D Rework - https://discord.gg/pbhdVdj
03.07.13 02:12:53 pm
Up
Shawni
User
Offline Off
user Xirot has written:
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.
We die once, do i have to hide to be visible ?
03.07.13 04:37:18 pm
Up
Chingy
User
Offline Off
@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.
03.07.13 05:01:13 pm
Up
Shawni
User
Offline Off
user Chingy has written:
@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:
We die once, do i have to hide to be visible ?
03.07.13 08:37:27 pm
Up
Xirot
User
Offline Off
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.
#Discord CS2D Rework - https://discord.gg/pbhdVdj
To the start Previous 1 Next To the start