English i need scripts pm msg

4 replies
Goto Page
To the start Previous 1 Next To the start
01.07.17 05:51:37 pm
Up
Brent002
User
Offline Off
im need scripts pm msg plz help me
IMG:https://cdn.discordapp.com/attachments/335096239458615296/586323669018476554/brent_4.jpg
01.07.17 06:01:48 pm
Up
Talented Doge
User
Offline Off
Search does help.

End of topic.
Talented Doge
01.07.17 06:20:22 pm
Up
JeeewNazi
User
Offline Off
Oh how sad...
01.07.17 07:55:22 pm
Up
Scott
BANNED
Offline Off
Here have 3 codes.

Code 1:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function totable(txt,mt)
     local tbl = {}
     if not mt then mt = "%s" end
     mt = "[^"..mt.."]+"
     for w in string.gmatch(txt,mt)
          table.insert(tbl,w)
     end
     return tbl
end

addhook([[say]],[[sayer]])
function sayer(id,txt)
     cmds = totable(txt)
     if cmds[1] == [[!pm]] then
          local pl = tonumber(cmds[2])
          local msg = string.sub(txt,7)
          msg2(pl,"©255255255"..player(id,"name"..": "..msg.."!C")
          msg2(id,"©255255255Sent message!@C")
          return 1
     end
end


Code 2:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
addhook ("say","pmsent")
function pmsent(id,txt)
if string.find(txt,"!pm") then
local to4=txt:sub(5,6)
msg2 (id,"©000255000You have sent a pm to "..player(to4,"name").."!")
return 1;
end
end

addhook ("say","pmrecieve")
function pmrecieve(id,txt)
local to1=txt:sub(1,3)
local to2=txt:sub(5,6)
local to3=txt:sub(8)
if to1=="!pm" then
msg2 (to2,"©000255255"..player(id,"name").."(pm): "..to3)
end
end


Code 3:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("say","action43")
function action43(id,txt)
     if string.sub(txt,0,3) == "!pm" then
     local pl = string.sub(txt,5,6)
     if player(pl,"exists") then
          local msg = string.sub(txt,7,99)
          msg2(pl,"©235143041"..player(id,"name").." (PRIVATE): "..msg)
          msg2(id,"©000255000Your message has been succesful sent!")
          return 1
     end
     end
end
03.07.17 10:30:13 am
Up
Brent002
User
Offline Off
thnx @scott for help
IMG:https://cdn.discordapp.com/attachments/335096239458615296/586323669018476554/brent_4.jpg
To the start Previous 1 Next To the start