-[IFwsI]-
You need an account to view all sections/topics

Join the forum, it's quick and easy

-[IFwsI]-
You need an account to view all sections/topics
-[IFwsI]-
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Help with a script?

5 posters

Page 2 of 2 Previous  1, 2

Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by alaa Tue Oct 13, 2015 2:27 pm

Se7en wrote:
Code:
clanmate = {1,2,3,4,5}

function clansArray(m)
   local array = {}
   for i = 1, m do
      array[i]=0
   end
   return array
end

stillwaiting = clansArray(32)

clanname = "vC"
numbers = 2
advers = 0

addhook("second","clans_removeb") function clans_removeb()
   for id = 1,32 do
      if (player(id,"exists")) then
         stillwaiting[id]=stillwaiting[id]+1
      end
   end
end

addhook("join","clans_fakingsw") function clans_fakingsw(id)
   stillwaiting[id]=0
end

addhook("leave","clans_fakinglsw") function clans_fakinglsw(id)
   stillwaiting[id]=0
end

addhook("minute","clans_minad") function clans_minad()
   if advers==1 then
      msg("©️000255000This server uses anti faking script")
   end
end

addhook("ms100","clans_fakingms")
function clans_fakingms()
   for id = 1,32 do
      if (player(id,"exists")) then
         if player(id,"usgn") ~= clanmate then
            if stillwaiting[id]<3 then
            else
               msg(player(id,"name").." faked the clan tag.")
               parse("kick "..id.." ")
            end
         end
      end
   end
end
Hello, this is anti faking (tag in name) script, it doesn't work.. it will kick everyone :c (only if having tag)
hey u stole it from me  Crying or Very sad  Crying or Very sad  y so rude m8
alaa
alaa
Site user
Site user

Gender : Male Posts : 1072
Points : 1209
Join date : 2015-01-24
Age : 23
Location : ramallah

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by Se7en Tue Oct 13, 2015 4:27 pm

alaa wrote:
Se7en wrote:
Code:
clanmate = {1,2,3,4,5}

function clansArray(m)
   local array = {}
   for i = 1, m do
      array[i]=0
   end
   return array
end

stillwaiting = clansArray(32)

clanname = "vC"
numbers = 2
advers = 0

addhook("second","clans_removeb") function clans_removeb()
   for id = 1,32 do
      if (player(id,"exists")) then
         stillwaiting[id]=stillwaiting[id]+1
      end
   end
end

addhook("join","clans_fakingsw") function clans_fakingsw(id)
   stillwaiting[id]=0
end

addhook("leave","clans_fakinglsw") function clans_fakinglsw(id)
   stillwaiting[id]=0
end

addhook("minute","clans_minad") function clans_minad()
   if advers==1 then
      msg("©️000255000This server uses anti faking script")
   end
end

addhook("ms100","clans_fakingms")
function clans_fakingms()
   for id = 1,32 do
      if (player(id,"exists")) then
         if player(id,"usgn") ~= clanmate then
            if stillwaiting[id]<3 then
            else
               msg(player(id,"name").." faked the clan tag.")
               parse("kick "..id.." ")
            end
         end
      end
   end
end
Hello, this is anti faking (tag in name) script, it doesn't work.. it will kick everyone :c (only if having tag)
hey u stole it from me  Crying or Very sad  Crying or Very sad  y so rude m8
k
#found-it-on-unreal-software-.de-lol-get-rekt-son-u-mad-?


@Nighthawk:

Code:
LUA ERROR: sys/lua/IF/addons/clan.lua:9: 'do' expected near 'if'
 -> [C]: in function 'dofile'
 -> [string "dofile("sys/lua/IF/addons/clan.lua")"]:1: in main chunk
what
Se7en
Se7en
Site user
Site user

Gender : Male Posts : 1163
Points : 1342
Join date : 2013-12-07
Age : 23
Location : Israel

http://slowpoke101.forum.st/

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by TheBoss Tue Oct 13, 2015 4:52 pm

Se7en, you just need to add a do in line 9 .. Nighthawk probably forgot it.


Not tested tho. It should work
Code:
members = {116310,1} -- add your usgn here
tag = "vC"

addhook("join", "antifaker_join")
function antifaker_join(id)
  local is_member = false
  if string.match(player(id, "name"), "^"..tag.."%s") or string.match(player(id, "name"), "%s"..tag.."$") then
      for k,v in ipairs(members) do
        if tonumber(player(id, "usgn")) == v then
            is_member = true
            break
        end
      end
  end
  if is_member ~= true then parse('kick '..id..' no fake k ty') end
end
TheBoss
TheBoss
Site user
Site user

Gender : Male Posts : 278
Points : 601
Join date : 2011-11-02
Age : 74

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by Se7en Tue Oct 13, 2015 6:22 pm

TheBoss wrote:Se7en, you just need to add a do in line 9 .. Nighthawk probably forgot it.


Not tested tho. It should work
Code:
members = {116310,1} -- add your usgn here
tag = "vC"

addhook("join", "antifaker_join")
function antifaker_join(id)
   local is_member = false
   if string.match(player(id, "name"), "^"..tag.."%s") or string.match(player(id, "name"), "%s"..tag.."$") then
      for k,v in ipairs(members) do
         if tonumber(player(id, "usgn")) == v then
            is_member = true
            break
         end
      end
   end
   if is_member ~= true then parse('kick '..id..' no fake k ty') end
end
yay
Se7en
Se7en
Site user
Site user

Gender : Male Posts : 1163
Points : 1342
Join date : 2013-12-07
Age : 23
Location : Israel

http://slowpoke101.forum.st/

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by Nighthawk Tue Oct 13, 2015 9:34 pm

Nighthawk wrote:You've got unnecessary stuff in there which will hog resources.

Code:

members = {116310,1} -- add your usgn here
tag = "vC"

addhook("join", "antifaker_join")
function antifaker_join(id)
 local is_member = false
 if string.match(player(id, "name"), "^"..tag.."%s") or string.match(player(id, "name"), "%s"..tag.."$") then
 for k,v in ipairs(members)
 if tonumber(player(id, "usgn")) == v then
 is_member = true
 break
 end
 end
 end
 if is_member ~= true then parse('kick '..id..' no fake k ty') end
end

Oh and, I haven't tested the script.

Don't use this. It's going to kick everyone. Use tis
Nighthawk
Nighthawk
-[IFwsI]- Co-Leader
-[IFwsI]- Co-Leader

Gender : Male Posts : 2426
Points : 2902
Join date : 2014-01-02
Age : 25
Location : Outside The Gates Of Your Mind

http://bit.ly/irfandahir

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by Nighthawk Tue Oct 13, 2015 9:35 pm

Nighthawk wrote:You've got unnecessary stuff in there which will hog resources.

Code:

members = {116310,1} -- add your usgn here
tag = "vC"

addhook("join", "antifaker_join")
function antifaker_join(id)
 local is_member = false
 if string.match(player(id, "name"), "^"..tag.."%s") or string.match(player(id, "name"), "%s"..tag.."$") then
 for k,v in ipairs(members)
 if tonumber(player(id, "usgn")) == v then
 is_member = true
 break
 end
 end
 end
 if is_member ~= true then parse('kick '..id..' no fake k ty') end
end

Oh and, I haven't tested the script.
Don't use this, it's going to kick everyone who's not in the usgn list. Use this.
Nighthawk
Nighthawk
-[IFwsI]- Co-Leader
-[IFwsI]- Co-Leader

Gender : Male Posts : 2426
Points : 2902
Join date : 2014-01-02
Age : 25
Location : Outside The Gates Of Your Mind

http://bit.ly/irfandahir

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by TheBoss Tue Oct 13, 2015 9:42 pm

Nighthawk wrote:
Nighthawk wrote:You've got unnecessary stuff in there which will hog resources.

Code:

members = {116310,1} -- add your usgn here
tag = "vC"

addhook("join", "antifaker_join")
function antifaker_join(id)
 local is_member = false
 if string.match(player(id, "name"), "^"..tag.."%s") or string.match(player(id, "name"), "%s"..tag.."$") then
 for k,v in ipairs(members)
 if tonumber(player(id, "usgn")) == v then
 is_member = true
 break
 end
 end
 end
 if is_member ~= true then parse('kick '..id..' no fake k ty') end
end

Oh and, I haven't tested the script.
Don't use this, it's going to kick everyone who's not in the usgn list. Use this.

Code:
for k,v in ipairs(members) do



// Damn that do. Here's the working script: http://pastebin.com/QKhCyF95
// Nighthawk
TheBoss
TheBoss
Site user
Site user

Gender : Male Posts : 278
Points : 601
Join date : 2011-11-02
Age : 74

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by Se7en Sat Oct 17, 2015 8:14 pm

Code:
function rp_int(id,txt)
   
   if Mute_text== 1 then
      gmsg2(id,"255255000","[Server]: \169255000000You can't send a message in mute mode.")
      return 1
   end

if rp_mute[id]== true then
   if txt ~="rank" then
      if txt:sub(1,1)=="!" then
            print(player(id,'name')..' used the command: '..txt)
            ParseCommand(id,txt)
         else
            gmsg2(id,"255255000","[Server]: \169255000000You can't send a message while muted.")
         return 1
      end
   end
end
      
   if txt:sub(1,1)=="!" then
      print(player(id,'name')..' used a command: '..txt)
      ParseCommand(id,txt)
      return 1
   end
   
   if stag[id] == 0 then
if string.sub(txt, #txt-1,#txt) == "@C" then
    txt = string.sub(txt, 1, #txt-2)
    end
      if txt ~="rank" then
      if txt:sub(1,1)=="!" then
            print(player(id,'name')..' used the command: '..txt)
            ParseCommand(id,txt)
         else
            gmsg("255255255",player(id,"name").." [Lvl-"..cs_level[id].."]: "..txt)
         return 1
      end
   end
end
   
   
   if stag[id] == 1 then
      if txt ~="rank" then
         if rp_ct[id] == true then
               if rp_Adminlevel[id] == 4 then
               gmsg(""..admin_sayco4.."","{"..admin_saylv4.."} "..player(id,"name")..":\169255255255 "..txt)
            elseif rp_Adminlevel[id] == 3 then
               gmsg(""..admin_sayco3.."","["..admin_saylv3.."] "..player(id,"name")..":\169255255255 "..txt)
            elseif rp_Adminlevel[id] == 2 then
               gmsg(""..admin_sayco2.."","("..admin_saylv2..") "..player(id,"name")..":\169255255255 "..txt)
            elseif rp_Adminlevel[id] == 1 then
               gmsg(""..admin_sayco1.."","/"..admin_saylv1.."/ "..player(id,"name")..":\169255255255 "..txt)
            else
               rc2(id,txt)
            end
         elseif rp_vip[id] == 1 then
         if string.sub(txt, #txt-1,#txt) == "@C" then
    txt = string.sub(txt, 1, #txt-2)
    end
         gmsg(""..vip_sayco.."","/"..vip_say.."/ "..player(id,"name")..": "..txt)
         end
         return 1
      end   
   end   
end
Hi! this is my say hook, and its pretty annoying because it's doing this on the logs:
LUA ERROR: attempt to call a nil value
 -> in Lua hook 'say', params: 1, 'hello'
(I said hello)
I have no idea how to fix it so... Oh hi! mind taking a look at this fancy buggy lua script? =D

pls
Se7en
Se7en
Site user
Site user

Gender : Male Posts : 1163
Points : 1342
Join date : 2013-12-07
Age : 23
Location : Israel

http://slowpoke101.forum.st/

Back to top Go down

Help with a script? - Page 2 Empty Re: Help with a script?

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum