English Script Request

5 replies
Goto Page
To the start Previous 1 Next To the start
22.07.12 10:23:16 pm
Up
Jhony
User
Offline Off
How to mute the usgn of Player?

example :
Code:
1
@mute [ID or USGN] and @unmute [ID or USGN]

________________________________________
How to Lock Player any team?

example :
Code:
1
@lockT [ID or USGN] , @lockCT [ID or USGN] @lockspec [ID or USGN] @unlock [ID or USGN]


help?
22.07.12 10:46:39 pm
Up
PyKemis
User
Offline Off
You can check if the number is greater than 32, if it is then it is a usgn and you can loop through the players to find which one to lock.

ex.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
function mute(id)
     if id>32 then
          for _,id2 in pairs(player(0,"table")) do
               if player(id2,"usgn")==id then
                    --mute player(id2) here
                    return true
               end
          end
          return false
     end
     --mute player(id) here
     return true
end


Code returns false if the usgn specified was not found.
22.07.12 11:34:09 pm
Up
TheHamzan6
User
Offline Off
file cs2d Mute Script (10)

People need to learn how to search.
Walk amongst the crowd, but follow a path away slowly into the shadows.
22.07.12 11:47:00 pm
Up
Jhony
User
Offline Off
user TheHamzan6 has written:
file cs2d Mute Script (10)

People need to learn how to search.

doesn't works !
23.07.12 02:04:01 am
Up
omg
User
Offline Off
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
mutes=initArray(32)

addhook("say","rofl_mao")
function rofl_mao(id,txt)
     if string.sub(txt,1,5)=="@mute" then
          mutes[tonumber(string.sub(txt,7))]=1
          msg(player(tonumber(string.sub(txt,7)),"name").." has been muted! LOL!")
          return 1
     elseif string.sub(txt,1,7)=="@unmute" then
          mutes[tonumber(string.sub(txt,9))]=0
          msg(player(tonumber(string.sub(txt,9)),"name").." has been unmuted! LOL!")
          return 1
     else
          if mutes[id]==1 then
               msg2(id,"You are muted! LOL!")
               return 1
          end
     end
end

addhook("leave","vanilla_ice_cream")
function vanilla_ice_cream(id)
     mutes[id]=0
end

oh HA this is for player id
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
mutes={}

addhook("say","pepperoni_pizza")
function pepperoni_pizza(id,txt)
     if string.sub(txt,1,5)=="@mute" then
          local usgn=tonumber(string.sub(txt,7))
          if usgn<33 then
               usgn=player(usgn,"usgn")
          end
          table.insert(mutes,usgn)
          return 1
     elseif string.sub(txt,1,7)=="@unmute" then
          local usgn=tonumber(string.sub(txt,9))
          for i,v in ipairs(mutes) do
               if v==usgn then
                    table.remove(mutes,i)
                    return 1
               end
          end
     else
          for _,usgn in pairs(mutes) do
               if usgn==player(id,"usgn") then
                    msg2(id,"You are muted! LOL!")
                    return 1
               end
          end
     end
end

addhook("leave","banana_bonanza")
function banana_bonanza(id)
     local usgn=player(id,"usgn")
     for i,v in ipairs(mutes) do
          if v==usgn then
               table.remove(mutes,i)
               return
          end
     end
end

k should be working
edited 7×, last 23.07.12 02:23:04 am
will code for food
23.07.12 04:32:29 pm
Up
Jhony
User
Offline Off
Thanks !!

You Have a Lock Script?
To the start Previous 1 Next To the start