English A script bug

8 replies
Goto Page
To the start Previous 1 Next To the start
09.06.13 10:07:41 pm
Up
Xirot
User
Offline Off
Well , I'm not a scripter.
And I don't know scripting/codding.
Who can help me doing this :
1. I want to make a small command for every rank.
!off (to hide the rank say and talk normaly) !on (to run the say color).
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
Admins = {xxxxx}
Modertors = {xxxxx}
Members = {44770}

addhook("say", "rankSay")
function rankSay(id, text)
     
     local _, i;
     for _, i in ipairs(Admins) do
          if (i == player(id, "usgn")) then
               msg("©255255255" .. player(id,"name") .. " [Admin]: " .. text)
               return 1;
          end
     end          
                    
     for _, i in ipairs(Modertors) do
          if (i == player(id, "usgn")) then
               msg("©034252010" .. player(id,"name") .. " [Modertor]: " .. text)
               return 1;
          end
     end
     
     for _, i in ipairs(Members) do
          if (i == player(id, "usgn")) then
               msg("©25212310" .. player(id,"name") .. " [Member] " .. text)
               return 1;
          end
     end
end
Yakuza.
09.06.13 10:41:52 pm
Up
limonata
User
Offline Off
Here is the script. Sorry for some tab mistakes.

Commands:

- !on
- !off
--------
Spoiler >
edited 1×, last 10.06.13 07:39:13 pm
09.06.13 10:57:24 pm
Up
J_Lucas
User
Offline Off
09.06.13 10:59:34 pm
Up
limonata
User
Offline Off
If he dont know anything about lua. So it might be hard to edit your script for him.
10.06.13 12:54:52 am
Up
Xirot
User
Offline Off
@user limonata:
36:'then'expected near mod.
Yakuza.
10.06.13 01:59:28 am
Up
Rainoth
Moderator
Offline Off
user Xirot has written:
@user limonata:
36:'then'expected near mod.


He wrote "is Mod" instead of "isMod"
Function name makes a big difference. It's just a small mistake
10.06.13 11:28:00 am
Up
Xirot
User
Offline Off
Thank you , guys.
I'll try this later
Yakuza.
10.06.13 07:40:36 pm
Up
limonata
User
Offline Off
@user Xirot: Sorry, i fixed it now.

False:

Code:
1
is Mod(id)


True:

Code:
1
isMod(id)
10.06.13 10:00:34 pm
Up
Xirot
User
Offline Off
Okay
Yakuza.
To the start Previous 1 Next To the start