找回密码
 立即注册
    查看: 9|回复: 2

    nn----封装函数汇总

    [复制链接]

    18

    主题

    2

    回帖

    99

    积分

    积分
    99
    发表于 2025-2-18 14:06:27 | 显示全部楼层 |阅读模式
    汇总

    18

    主题

    2

    回帖

    99

    积分

    积分
    99
     楼主| 发表于 2025-2-18 14:07:58 | 显示全部楼层
    -----获取是否为电脑端

    1. function getispc(actor) --获取是否电脑端
    2.         if getconst(actor,"<$CLIENTFLAG>") == "1" then
    3.                 return true
    4.         else
    5.                 return false
    6.         end
    7. end
    复制代码

    18

    主题

    2

    回帖

    99

    积分

    积分
    99
     楼主| 发表于 2025-3-12 18:57:26 | 显示全部楼层

    封装sendmsg9

    1. function smsg9(play,msg,color,miaobian)  ---sendmsg9
    2.     if color == nil then
    3.         color = "#FFFFFF"
    4.     end
    5.     if msg == "" then
    6.         sendmsg(play, 1, '{"Msg":"<font color=\'#ff0000\'>未设置消息</font>","Type":9}')
    7.         return
    8.     end
    9.     if miaobian == "" then
    10.         if getconst(play,"<$CLIENTFLAG>") == "1" then
    11.             miaobian = 1
    12.         else
    13.             miaobian = 0
    14.         end
    15.     end
    16.     sendmsg(play,1,[[{"Msg":"<outline size=']].. miaobian ..[['> <font color=']].. color ..[['>]]..msg..[[</font> </outline>","Type":9,"Time":"1"}]])
    17. end
    复制代码
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则