Help with a script?
5 posters
Page 1 of 2
Page 1 of 2 • 1, 2
Help with a script?
Hi, I'm a newbie in lua and if you came here you aren't.
This should spawn a player, (30% made by me lol) but when I type a wrong ID it will send this on console:
ERROR: spawnplayer - player #3 does not exist!
LUA ERROR: sys/lua/IF/sys/functions.lua:576: attempt to concatenate a boolean value
-> sys/lua/IF/sys/functions.lua:576: in function 'ParseCommand'
-> sys/lua/IF/sys/hooks.lua:192: in function
-> in Lua hook 'say', params: 1, '!spawn 3'
Edit: no im not making a new jail!! xdddd
Edit2: pls dont be med at meh
- Code:
elseif cmd == "!spawn" then
if rp_Adminlevel[id] >= 3 then
local iid = tonumber(p[2])
if iid ~= nil then
parse("spawnplayer "..iid)
parse("setpos "..iid.." "..player(id,"x").." "..player(id,"y"))
msg2(id,"\169255255000[Server]: \169000255000You have spawned "..player(iid,"name")..".")
else
gmsg2(id,"255255000","[Server]: \169255000000This player does not exist.")
end
else
gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.")
end
This should spawn a player, (30% made by me lol) but when I type a wrong ID it will send this on console:
ERROR: spawnplayer - player #3 does not exist!
LUA ERROR: sys/lua/IF/sys/functions.lua:576: attempt to concatenate a boolean value
-> sys/lua/IF/sys/functions.lua:576: in function 'ParseCommand'
-> sys/lua/IF/sys/hooks.lua:192: in function
-> in Lua hook 'say', params: 1, '!spawn 3'
Edit: no im not making a new jail!! xdddd
Edit2: pls dont be med at meh
Re: Help with a script?
Copy/paste the functions.lua at pastie or some online code hosting and post it here.
Re: Help with a script?
i sent in pm because script is private o.o
pls
Nevermind TheBoss
fixed it for me
Also this code, it meant to be used to send money but I only want positive numbers (you can steal money by doing !transfer -99999)...
pls
Nevermind TheBoss
fixed it for me
- Code:
elseif cmd =="!transfer" then
local pl = tonumber(p[2])
local mny = tonumber(p[3])
if pl ~= nil and mny ~= nil then
if player(pl,"exists") then
if rp_money[id] >= mny then
rp_money[id]=rp_money[id]-mny
rp_money[pl]=rp_money[pl]+mny
gmsg2(pl,"255255000","[Server]: \169000255000"..player(id,"name").." gave you "..mny.."$")
gmsg2(id,"255255000","[Server]: \169000255000You gave "..mny.."$ to "..player(pl,"name"))
updatehud(pl)
updatehud(id)
end
else
gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.")
end
Also this code, it meant to be used to send money but I only want positive numbers (you can steal money by doing !transfer
Re: Help with a script?
- Code:
elseif cmd =="!transfer" then
local pl = tonumber(p[2])
local mny = tonumber(p[3])
if pl ~= nil and mny ~= nil and mny > 0 then
if player(pl,"exists") then
if rp_money[id] >= mny then
rp_money[id]=rp_money[id]-mny
rp_money[pl]=rp_money[pl]+mny
gmsg2(pl,"255255000","[Server]: \169000255000"..player(id,"name").." gave you "..mny.."$")
gmsg2(id,"255255000","[Server]: \169000255000You gave "..mny.."$ to "..player(pl,"name"))
updatehud(pl)
updatehud(id)
end
else
gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.")
end
Re: Help with a script?
Yay it workedNighthawk wrote:
- Code:
elseif cmd =="!transfer" then
local pl = tonumber(p[2])
local mny = tonumber(p[3])
if pl ~= nil and mny ~= nil and mny > 0 then
if player(pl,"exists") then
if rp_money[id] >= mny then
rp_money[id]=rp_money[id]-mny
rp_money[pl]=rp_money[pl]+mny
gmsg2(pl,"255255000","[Server]: \169000255000"..player(id,"name").." gave you "..mny.."$")
gmsg2(id,"255255000","[Server]: \169000255000You gave "..mny.."$ to "..player(pl,"name"))
updatehud(pl)
updatehud(id)
end
else
gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.")
end
Re: Help with a script?
If you require further assistance, don't make new threads. Do yer posts here. o.O
Re: Help with a script?
#copyright ;0Elisabeth. wrote:..Someone with Script Experiencie (Better call it S.E) ..
Anyways, you people can post your scripts here and any good willed or bored individual may seek to help you out.
Re: Help with a script?
- Code:
function tptojail(id)
math.random(1,3)
if math.random == 1 then
msg("1")
parse("setpos "..id.." 500 500")
end
if math.random == 2 then
msg("2")
end
if math.random == 3 then
msg("3")
end
end
This thing should calculate from 1 to 3, if 1 is selected it will say 1 if 2 is selected it will say 2 and if 3 is selected it will say 3.
Any help will be greeted
Re: Help with a script?
Please be more clear .. I didn't understand ..
TheBoss- Site user
- Gender : Posts : 278
Points : 601
Join date : 2011-11-02
Age : 74
Re: Help with a script?
The script is this:
If you are a police you get Elite on spawn, if you shoot someone with the Elite and he has rp_killer=true it will teleport him to a random cell (3 cells total)
The script above is calculating a number from 1 to 3 (random) and if 1 comes out it will teleport to cell 1 (so on for cell 2 and 3)
The message is just debug to know if it works. (that's how I do most of my scripts)
If you are a police you get Elite on spawn, if you shoot someone with the Elite and he has rp_killer=true it will teleport him to a random cell (3 cells total)
The script above is calculating a number from 1 to 3 (random) and if 1 comes out it will teleport to cell 1 (so on for cell 2 and 3)
The message is just debug to know if it works. (that's how I do most of my scripts)
Re: Help with a script?
Se7en wrote:The script is this:
If you are a police you get Elite on spawn, if you shoot someone with the Elite and he has rp_killer=true it will teleport him to a random cell (3 cells total)
The script above is calculating a number from 1 to 3 (random) and if 1 comes out it will teleport to cell 1 (so on for cell 2 and 3)
The message is just debug to know if it works. (that's how I do most of my scripts)
do u mean same BFOP Roleplay server ? the jail mode if he killed some1 and a police shoted him he will get moved to jail (a cell for 1 min)?
alaa- Site user
- Gender : Posts : 1072
Points : 1209
Join date : 2015-01-24
Age : 23
Location : ramallah
Re: Help with a script?
Yeah that's similar but I want it to select a random cell instead.
I already have the actual script I just need it to select a random cell.
I already have the actual script I just need it to select a random cell.
Re: Help with a script?
Okay, look. math.random is a function. You need to assign a value to a variable and pass it on. For example, I'll assign the variable 'tp_random' a function 'math.random(1,3)'. 'math.random(1,3)' will return any number between 1-3 to the variable 'tp_random' now. So it's going to be like this:
- Code:
function tptojail(id)
tp_random = math.random(1,3)
if tp_random == 1 then
msg("1")
parse("setpos "..id.." 500 500")
end
if tp_random == 2 then
msg("2")
end
if tp_random == 3 then
msg("3")
end
end
Re: Help with a script?
please help me with this lua im getting bored fixing it.. and can any1 help me in making those?
1- MVP Script
2- !lockteams and !unlockteams
3- !makect and !maket and !makespec
4- !bc
5-!map
6-!knife
7-!restart
8- !info
1- MVP Script
2- !lockteams and !unlockteams
3- !makect and !maket and !makespec
4- !bc
5-!map
6-!knife
7-!restart
8- !info
- 0.0:
- function clansArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
stillwaiting = clansArray(32)
clanname = ">ExtremeControl2d<"
numbers = 7
advers = 1
addhook("second","clans_removeb") function clans_removeb() -- to not make it buggy we do this
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 Clan Script version 0.7 made for mixs by lelu usgn od 46109")
msg("000255000Made by Lelu")
end
end
addhook("ms100","clans_fakingms") function clans_fakingms()
for id = 1,32 do
if (player(id,"exists")) then
a = "";
for l in io.lines("sys/lua/clans/members.txt") do -- Check members in file
a = (a.." "..l)
end
c = player(id,"usgn")
local ismember = string.find(a,c) -- Find all the USGNs in the file
if (string.sub(player(id,"name"),1,numbers) == clanname) then
if ismember then
--
else
if stillwaiting[id]<3 then
--
else
msg(player(id,"name").." Got kicked due faking")
parse("kick "..id.." faking")
end
end
end
end
end
end
addhook("say","clans_acmd") function clans_acmd(id,t) -- Admin CMD's
a = "";
for l in io.lines("sys/lua/clans/members.txt") do -- Check members in file
a = (a.." "..l)
end
c = player(id,"usgn")
local ismember = string.find(a,c) -- Find all the USGNs in the file
if (string.sub(t,1,4) == "!msg") then -- MSG cmd
if ismember then
local msgg = string.sub(t,6)
if msgg=="" then
msg2(id,"[!MSG] CMD spelled wrong, please type [!MSG TEXT]")
return 1
else
msg("123456789"..player(id,"name")..": "..msgg)
return 1
end
else
msg2(id,"255000000You aint an member")
return 1
end
elseif (string.sub(t,1,5) == "!kick") or (string.sub(t,1,5) == "!KICK") then -- kick cmd
if ismember then
if (string.sub(t,7,Cool) then
local pl = string.sub(t,7,Cool
if (player(pl,"exists")) then
local reason = string.sub(t,9)
if reason=="" then
msg("255000000"..player(pl,"name").." Got kicked")
parse("kick "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got kicked, Reason: "..reason)
parse("kick "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
elseif (string.sub(t,7,9)) then
local pl = string.sub(t,7,9)
if (player(pl,"exists")) then
local reason = string.sub(t,11)
if reason=="" then
msg("255000000"..player(pl,"name").." Got kicked")
parse("kick "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got kicked, Reason: "..reason)
parse("kick "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
end
else
msg2(id,"255000000You aint an member")
return 1
end
elseif (string.sub(t,1,4) == "!ban") or (string.sub(t,1,4) == "!BAN") then -- ban cmd
if ismember then
if (string.sub(t,6,7)) then
local pl = string.sub(t,6,7)
if (player(pl,"exists")) then
local reason = string.sub(t,Cool
if reason=="" then
msg("255000000"..player(pl,"name").." Got Banned")
parse("banip "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got Banned, Reason: "..reason)
parse("banip "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
elseif (string.sub(t,6,Cool) then
local pl = string.sub(t,6,Cool
if (player(pl,"exists")) then
local reason = string.sub(t,10)
if reason=="" then
msg("255000000"..player(pl,"name").." Got Banned")
parse("banip "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got Banned, Reason: "..reason)
parse("banip "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
end
else
msg2(id,"255000000You aint an member")
return 1
end
end
end
alaa- Site user
- Gender : Posts : 1072
Points : 1209
Join date : 2015-01-24
Age : 23
Location : ramallah
Re: Help with a script?
Thanks nuggethawk it worked =DNighthawk wrote:
Okay, look. math.random is a function. You need to assign a value to a variable and pass it on. For example, I'll assign the variable 'tp_random' a function 'math.random(1,3)'. 'math.random(1,3)' will return any number between 1-3 to the variable 'tp_random' now. So it's going to be like this:
- Code:
function tptojail(id)
tp_random = math.random(1,3)
if tp_random == 1 then
msg("1")
parse("setpos "..id.." 500 500")
end
if tp_random == 2 then
msg("2")
end
if tp_random == 3 then
msg("3")
end
end
I have another minor problem,
- Code:
addhook("spawn","jobspawn")
addhook("join","job_join")
addhook("leave","job_leave")
rp_killer = Array(32,false)
function jobspawn(id)
tpjob(id)
rp_killer[id]=false
end
function job_leave(id)
rp_killer[id]=false
rp_police[id]=false
rp_doctor[id]=false
rp_criminal[id]=false
end
function jobjoin(id)
rp_killer[id]=false
end
function tptojail(id)
tp_random = math.random(1,3)
if rp_killer[id]==true then
if tp_random == 1 then
--msg("1")
parse("setpos "..id.." 179 2188")
jailtime(id)
end
if tp_random == 2 then
--msg("2")
parse("setpos "..id.." 339 2188")
jailtime(id)
end
if tp_random == 3 then
--msg("3")
parse("setpos "..id.." 499 2188")
jailtime(id)
end
end
end
function jailtime(id)
timer("6000","jailover")
end
function jailover(id)
msg("debug - jailover")
rp_killer[id]=false
end
when the time run out the rp_killer[id]=false wont be activated so he will never be free...
the message and everything else works fine though
Re: Help with a script?
@Se7en, replace this your timer function with this:
- Code:
function jailover()
local playerslist = player(0, "table")
msg("debug - jailover")
for _,id in ipairs(playerslist) do
rp_killer[id]=false
end
end
lelu, plis.alaa wrote:please help me with this lua im getting bored fixing it.. and can any1 help me in making those?
1- MVP Script
2- !lockteams and !unlockteams
3- !makect and !maket and !makespec
4- !bc
5-!map
6-!knife
7-!restart
8- !infoand i will be really thanked to you if u helped me cuz im newbie in lua :D
- 0.0:
function clansArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
stillwaiting = clansArray(32)
clanname = ">ExtremeControl2d<"
numbers = 7
advers = 1
addhook("second","clans_removeb") function clans_removeb() -- to not make it buggy we do this
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 Clan Script version 0.7 made for mixs by lelu usgn od 46109")
msg("©000255000Made by Lelu")
end
end
addhook("ms100","clans_fakingms") function clans_fakingms()
for id = 1,32 do
if (player(id,"exists")) then
a = "";
for l in io.lines("sys/lua/clans/members.txt") do -- Check members in file
a = (a.." "..l)
end
c = player(id,"usgn")
local ismember = string.find(a,c) -- Find all the USGNs in the file
if (string.sub(player(id,"name"),1,numbers) == clanname) then
if ismember then
--
else
if stillwaiting[id]<3 then
--
else
msg(player(id,"name").." Got kicked due faking")
parse("kick "..id.." faking")
end
end
end
end
end
end
addhook("say","clans_acmd") function clans_acmd(id,t) -- Admin CMD's
a = "";
for l in io.lines("sys/lua/clans/members.txt") do -- Check members in file
a = (a.." "..l)
end
c = player(id,"usgn")
local ismember = string.find(a,c) -- Find all the USGNs in the file
if (string.sub(t,1,4) == "!msg") then -- MSG cmd
if ismember then
local msgg = string.sub(t,6)
if msgg=="" then
msg2(id,"[!MSG] CMD spelled wrong, please type [!MSG TEXT]")
return 1
else
msg("©123456789"..player(id,"name")..": "..msgg)
return 1
end
else
msg2(id,"©255000000You aint an member")
return 1
end
elseif (string.sub(t,1,5) == "!kick") or (string.sub(t,1,5) == "!KICK") then -- kick cmd
if ismember then
if (string.sub(t,7,Cool) then
local pl = string.sub(t,7,Cool
if (player(pl,"exists")) then
local reason = string.sub(t,9)
if reason=="" then
msg("©255000000"..player(pl,"name").." Got kicked")
parse("kick "..pl)
return 1
else
msg("©255000000"..player(pl,"name").." Got kicked, Reason: "..reason)
parse("kick "..pl.." "..reason)
return 1
end
else
msg2(id,"©255000000Player dosent exists")
return 1
end
elseif (string.sub(t,7,9)) then
local pl = string.sub(t,7,9)
if (player(pl,"exists")) then
local reason = string.sub(t,11)
if reason=="" then
msg("©255000000"..player(pl,"name").." Got kicked")
parse("kick "..pl)
return 1
else
msg("©255000000"..player(pl,"name").." Got kicked, Reason: "..reason)
parse("kick "..pl.." "..reason)
return 1
end
else
msg2(id,"©255000000Player dosent exists")
return 1
end
end
else
msg2(id,"©255000000You aint an member")
return 1
end
elseif (string.sub(t,1,4) == "!ban") or (string.sub(t,1,4) == "!BAN") then -- ban cmd
if ismember then
if (string.sub(t,6,7)) then
local pl = string.sub(t,6,7)
if (player(pl,"exists")) then
local reason = string.sub(t,Cool
if reason=="" then
msg("©255000000"..player(pl,"name").." Got Banned")
parse("banip "..pl)
return 1
else
msg("©255000000"..player(pl,"name").." Got Banned, Reason: "..reason)
parse("banip "..pl.." "..reason)
return 1
end
else
msg2(id,"©255000000Player dosent exists")
return 1
end
elseif (string.sub(t,6,Cool) then
local pl = string.sub(t,6,Cool
if (player(pl,"exists")) then
local reason = string.sub(t,10)
if reason=="" then
msg("©255000000"..player(pl,"name").." Got Banned")
parse("banip "..pl)
return 1
else
msg("©255000000"..player(pl,"name").." Got Banned, Reason: "..reason)
parse("banip "..pl.." "..reason)
return 1
end
else
msg2(id,"©255000000Player dosent exists")
return 1
end
end
else
msg2(id,"©255000000You aint an member")
return 1
end
end
end
Last edited by Nighthawk on Wed Oct 07, 2015 7:57 pm; edited 2 times in total
Re: Help with a script?
Nighthawk wrote:@Se7en, replace this your timer function with this:
- Code:
function jailover()
local playerslist = player(0, "table")
msg("debug - jailover")
for _,id in ipairs(playerslist) do
rp_killer[id]=false
end
endlelu, plis.alaa wrote:please help me with this lua im getting bored fixing it.. and can any1 help me in making those?
1- MVP Script
2- !lockteams and !unlockteams
3- !makect and !maket and !makespec
4- !bc
5-!map
6-!knife
7-!restart
8- !infoand i will be really thanked to you if u helped me cuz im newbie in lua
- 0.0:
function clansArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
stillwaiting = clansArray(32)
clanname = ">ExtremeControl2d<"
numbers = 7
advers = 1
addhook("second","clans_removeb") function clans_removeb() -- to not make it buggy we do this
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 Clan Script version 0.7 made for mixs by lelu usgn od 46109")
msg("000255000Made by Lelu")
end
end
addhook("ms100","clans_fakingms") function clans_fakingms()
for id = 1,32 do
if (player(id,"exists")) then
a = "";
for l in io.lines("sys/lua/clans/members.txt") do -- Check members in file
a = (a.." "..l)
end
c = player(id,"usgn")
local ismember = string.find(a,c) -- Find all the USGNs in the file
if (string.sub(player(id,"name"),1,numbers) == clanname) then
if ismember then
--
else
if stillwaiting[id]<3 then
--
else
msg(player(id,"name").." Got kicked due faking")
parse("kick "..id.." faking")
end
end
end
end
end
end
addhook("say","clans_acmd") function clans_acmd(id,t) -- Admin CMD's
a = "";
for l in io.lines("sys/lua/clans/members.txt") do -- Check members in file
a = (a.." "..l)
end
c = player(id,"usgn")
local ismember = string.find(a,c) -- Find all the USGNs in the file
if (string.sub(t,1,4) == "!msg") then -- MSG cmd
if ismember then
local msgg = string.sub(t,6)
if msgg=="" then
msg2(id,"[!MSG] CMD spelled wrong, please type [!MSG TEXT]")
return 1
else
msg("123456789"..player(id,"name")..": "..msgg)
return 1
end
else
msg2(id,"255000000You aint an member")
return 1
end
elseif (string.sub(t,1,5) == "!kick") or (string.sub(t,1,5) == "!KICK") then -- kick cmd
if ismember then
if (string.sub(t,7,Cool) then
local pl = string.sub(t,7,Cool
if (player(pl,"exists")) then
local reason = string.sub(t,9)
if reason=="" then
msg("255000000"..player(pl,"name").." Got kicked")
parse("kick "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got kicked, Reason: "..reason)
parse("kick "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
elseif (string.sub(t,7,9)) then
local pl = string.sub(t,7,9)
if (player(pl,"exists")) then
local reason = string.sub(t,11)
if reason=="" then
msg("255000000"..player(pl,"name").." Got kicked")
parse("kick "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got kicked, Reason: "..reason)
parse("kick "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
end
else
msg2(id,"255000000You aint an member")
return 1
end
elseif (string.sub(t,1,4) == "!ban") or (string.sub(t,1,4) == "!BAN") then -- ban cmd
if ismember then
if (string.sub(t,6,7)) then
local pl = string.sub(t,6,7)
if (player(pl,"exists")) then
local reason = string.sub(t,Cool
if reason=="" then
msg("255000000"..player(pl,"name").." Got Banned")
parse("banip "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got Banned, Reason: "..reason)
parse("banip "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
elseif (string.sub(t,6,Cool) then
local pl = string.sub(t,6,Cool
if (player(pl,"exists")) then
local reason = string.sub(t,10)
if reason=="" then
msg("255000000"..player(pl,"name").." Got Banned")
parse("banip "..pl)
return 1
else
msg("255000000"..player(pl,"name").." Got Banned, Reason: "..reason)
parse("banip "..pl.." "..reason)
return 1
end
else
msg2(id,"255000000Player dosent exists")
return 1
end
end
else
msg2(id,"255000000You aint an member")
return 1
end
end
end
im newbie in lua
pl0x hlp me
alaa- Site user
- Gender : Posts : 1072
Points : 1209
Join date : 2015-01-24
Age : 23
Location : ramallah
Re: Help with a script?
Lelu, I'd say use another script .. There are many admin scripts which are much functional than yours. Yours can be barely understood. You didn't use the 'tab' button so it's hard to read. You're literally asking us to create a new script for you.
TheBoss- Site user
- Gender : Posts : 278
Points : 601
Join date : 2011-11-02
Age : 74
Re: Help with a script?
Okay so I couldn't solve the problem, (unrealsoftware couldnt either http://unrealsoftware.de/forum_posts.php?post=395261&l#jl )
So I got a idea, whenever you are no longer in the cell your rp_killer will become false! Pls help idk how
So I got a idea, whenever you are no longer in the cell your rp_killer will become false! Pls help idk how
Re: Help with a script?
- 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)
Re: Help with a script?
You've got unnecessary stuff in there which will hog resources.
Oh and, I haven't tested the script.
- 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.
Page 1 of 2 • 1, 2
Similar topics
» POLL for what admin script to use HC script vs Kirby's script
» can we stop using kirby script?
» Script idea
» How to make the scan script?
» Script Bugs
» can we stop using kirby script?
» Script idea
» How to make the scan script?
» Script Bugs
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum
|
|