English Clan tag

24 replies
Goto Page
To the start Previous 1 2 Next To the start
06.09.12 08:48:20 pm
Up
Jabama
User
Offline Off
After searching the scripts, I wanted to know if there was a way that a button in f3/f4 could be made saying clan tag ON/OFF (whether it was on or off). It would be amazing if someone could write one. Clan tag=#Lewa |
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
06.09.12 08:58:37 pm
Up
Jynxxx
User
Offline Off
I'm guessing this is what you want.
Code:
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
29
Clan = {}

addhook("join","_join")
function _join(id)
     Clan[id] = {clantag = "#Lewa | ", clant = 0}
end

addhook("serveraction","_action")
function _action(id,action)
     if action == 1 then
          if Clan[id].clant == 0 then
               Clan[id].clant = 1
               msg2(id,"©000255000Tag has been turned on!")
          else
               Clan[id].clant = 0
               msg2(id,"©000255000Tag has been turned off!")
          end
     end
end

addhook("say","_say")
function _say(id,text)
     if Clan[id].clant == 1 then
          msg("©255000000"..Clan[id].clantag..""..player(id,"name")..": "..text)
          return 1
     else
     
     end
end
06.09.12 09:34:20 pm
Up
Jabama
User
Offline Off
Yeah, I mean when I press f3 I get the option, not just when I come on.
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
07.09.12 01:07:58 pm
Up
ExecL
User
Offline Off
user Jabama has written:
Yeah, I mean when I press f3 I get the option, not just when I come on.


Code:
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
29
30
31
32
33
34
35
36
37
38
39
Clan = {}

addhook("join","_join")
function _join(id)
     Clan[id] = {clantag = "#Lewa | ", clant = 0}
end

addhook("serveraction","_action")
function _action(id,action)
     if action == 1 then
          menu(id,"Clan Tag,On,Off")
     end
end

addhook("menu","_menu")
function _menu(id,title,button) 
     if title == "Clan Tag" then
          if button == 1 then
               if Clan[id].clant == 0 then
                    Clan[id].clant = 1
                    msg2(id,"©000255000Tag has been turned on!")
               end
          end
          if button == 2 then
               Clan[id].clant = 0
               msg2(id,"©000255000Tag has been turned off!")
          end
     end
end

addhook("say","_say")
function _say(id,text)
     if Clan[id].clant == 1 then
          msg("©255000000"..Clan[id].clantag..""..player(id,"name")..": "..text)
          return 1
     else
     
     end
end


Like this?
07.09.12 07:42:09 pm
Up
Jabama
User
Offline Off
Yeah, but when I press on it doesn't do anything.
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
07.09.12 10:41:36 pm
Up
VADemon
User
Offline Off
https://gist.github.com/3226436

Wasnt made specially for Clan tags, but it's toggle-able, unlimited users, highly customizable
07.09.12 10:58:47 pm
Up
Jabama
User
Offline Off
That's too confusing.. I want something simple.
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
08.09.12 12:42:34 am
Up
Flacko
User
Offline Off
I'm guessing this will require a table with all the USGN ids of your members, right?
08.09.12 01:27:03 am
Up
ExecL
User
Offline Off
user Jabama has written:
Yeah, but when I press on it doesn't do anything.


Press F2 and it will open a menu.
08.09.12 09:23:14 am
Up
Jabama
User
Offline Off
Yeah. Is that hard?
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
08.09.12 09:28:27 am
Up
ExecL
User
Offline Off
user Jabama has written:
Yeah. Is that hard?


Code:
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
29
30
31
32
33
34
35
36
37
38
39
Clan = {}

addhook("join","_join")
function _join(id)
     Clan[id] = {clantag = "#Lewa | ", clant = 0}
end

addhook("serveraction","_action")
function _action(id,action)
     if action == 2 then
          menu(id,"Clan Tag,On,Off")
     end
end

addhook("menu","_menu")
function _menu(id,title,button) 
     if title == "Clan Tag" then
          if button == 1 then
               if Clan[id].clant == 0 then
                    Clan[id].clant = 1
                    msg2(id,"©000255000Tag has been turned on!")
               end
          end
          if button == 2 then
               Clan[id].clant = 0
               msg2(id,"©000255000Tag has been turned off!")
          end
     end
end

addhook("say","_say")
function _say(id,text)
     if Clan[id].clant == 1 then
          msg("©255000000"..Clan[id].clantag..""..player(id,"name")..": "..text)
          return 1
     else
     
     end
end


Here, press F3 and it will open a menu
08.09.12 10:30:16 am
Up
Jabama
User
Offline Off
Yeah, but when I put it on it says AC550000000 #LeWa | Jabama. And there is no switch.
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
08.09.12 10:42:56 am
Up
ExecL
User
Offline Off
I've tested it and it works fine. whats ur in-game name?
08.09.12 10:47:34 am
Up
Jabama
User
Offline Off
Jabama.
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
08.09.12 10:53:40 am
Up
ExecL
User
Offline Off
Are you pressing F3(key at the top)
If you are, is a menu opening?

like this? "AC550000000 #Lewa | Jabama"

idk how that would happend.

Are you running any other scripts,
and are you putting it in sys/lua/server.lua?
08.09.12 11:22:57 am
Up
Jabama
User
Offline Off
Yes a menu is opening, but the buttons don't do anything now.

And Yeah like that.

I was running an admin script, but I've put everything else in the samples, and now it doesn't work at all.

And No I'm not.

cookie
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
08.09.12 11:29:55 am
Up
ExecL
User
Offline Off
make a text file and save it as server.lua in sys/lua and put the lua in there, save it and run cs2d should work now.

dont run any other scripts!

pm me the admin script you were using.
08.09.12 11:50:41 am
Up
Jabama
User
Offline Off
Couldn't I just add it to those scripts?
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
08.09.12 12:02:35 pm
Up
ExecL
User
Offline Off
If you give me the admin script yea.
08.09.12 05:46:32 pm
Up
Jabama
User
Offline Off
I could just copy and paste it to it?

ADDED Here it is: http://www.unrealsoftware.de/files_show.php?file=12236
edited 2×, last 09.09.12 03:12:31 pm
IMG:http://s3.postimg.org/932nxdn73/Untitled.png
- Coming soon, Check for updates at; nopain.shivtr.com -
To the start Previous 1 2 Next To the start