Script Request
5 replies



22.07.12 10:23:16 pm
How to mute the usgn of Player?
example :
________________________________________
How to Lock Player any team?
example :
help?
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?
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 returns false if the usgn specified was not found.
ex.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
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
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.

doesn't works !
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
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
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
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
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



