Forum

> > CS2D > Scripts > Shotgun Lua V2.0
Forums overviewCS2D overview Scripts overviewLog in to reply

English Shotgun Lua V2.0

9 replies
To the start Previous 1 Next To the start

old Shotgun Lua V2.0

Leonidas12
User Off Offline

Quote
∗ İm maked a new lua its shotgun lua worging an not working please help me

Lua:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("ms100" , "equip")
addhook("spawn" , "equip2")
addhook("parse" , "msg")
addhook("spawn" , "msg2")


function equip(id,weapon)
	parse("equip "..id.." 10 ")
	parse("equip "..id.." 58 ")
	parse("equip "..id.." 51 ")
end
function equip(id,weapon)
end
	
                parse("equip "..id.." 10 ")
function msg(id,message)	
msg("©255255255Lua Made By Neomage") end

function msg2(id,message)
                   msg("©255255255Lua Made By Neomage") end

the error code :
1
LUA ERROR: sys/lua/sh.lua:15: attempt to concatenate global 'id' (a nil value)

thanks

old Re: Shotgun Lua V2.0

SilentDash
User Off Offline

Quote
try this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("ms100" , "equip")
addhook("spawn" , "equip2")
addhook("parse" , "msg")
addhook("spawn" , "msg2")


function equip(id,weapon)
     parse("equip "..id.." 10 ")
     parse("equip "..id.." 58 ")
     parse("equip "..id.." 51 ")
end
function equip(id,weapon)
parse("equip "..id.." 10 ")
end
function msg(id,message)     
msg("©255255255Lua Made By Neomage") 
end
function msg2(id,message)
msg("©255255255Lua Made By Neomage")
end

old Re: Shotgun Lua V2.0

Leonidas12
User Off Offline

Quote
user SilentDash has written
try this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("ms100" , "equip")
addhook("spawn" , "equip2")
addhook("parse" , "msg")
addhook("spawn" , "msg2")


function equip(id,weapon)
     parse("equip "..id.." 10 ")
     parse("equip "..id.." 58 ")
     parse("equip "..id.." 51 ")
end
function equip(id,weapon)
parse("equip "..id.." 10 ")
end
function msg(id,message)     
msg("©255255255Lua Made By Neomage") 
end
function msg2(id,message)
msg("©255255255Lua Made By Neomage")
end


its not working

old Re: Shotgun Lua V2.0

J4x
User Off Offline

Quote
This:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
addhook("ms100" , "equip")
addhook("spawn" , "equip2")
addhook("parse" , "msg")
addhook("spawn" , "msg2")


function equip(id,weapon)
      parse("equip "..id.." 10 ")
      parse("equip "..id.." 58 ")
      parse("equip "..id.." 51 ")
end

parse("equip "..id.." 10 ")
function msg(id,message)
msg("©255255255Lua Made By Neomage") end

function msg2(id,message)
msg("©255255255Lua Made By Neomage") end

old Re: Shotgun Lua V2.0

SilentDash
User Off Offline

Quote
Now i delete one of the msg's because i think addhock parse dont work...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("ms100" , "equip")
	addhook("spawn" , "equip2")
		addhook("spawn" , "msg2")


function equip(id,weapon)
parse("equip "..id.." 10")
parse("equip "..id.." 58")
parse("equip "..id.." 51")
end
	function equip(id,weapon)
	parse("equip "..id.." 10")
	end
		function msg2(id,message)
		msg("©255255255Lua Made By Neomage")
		end

old Re: Shotgun Lua V2.0

Leonidas12
User Off Offline

Quote
user SilentDash has written
Now i delete one of the msg's because i think addhock parse dont work...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("ms100" , "equip")
	addhook("spawn" , "equip2")
		addhook("spawn" , "msg2")


function equip(id,weapon)
parse("equip "..id.." 10")
parse("equip "..id.." 58")
parse("equip "..id.." 51")
end
	function equip(id,weapon)
	parse("equip "..id.." 10")
	end
		function msg2(id,message)
		msg("©255255255Lua Made By Neomage")
		end

Dont Works
error code :
1
LUA ERROR: sys/lua/gm.lua:12: attempt to concatenate local 'id' (a nil value)
try
1
for id =1, 32 do

old Re: Shotgun Lua V2.0

SilentDash
User Off Offline

Quote
Or maybe

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("ms100" , "equip3")
     addhook("spawn" , "equip2")
          addhook("spawn" , "msg2")


function equip3(id,weapon)
parse("equip "..id.." 10")
parse("equip "..id.." 58")
parse("equip "..id.." 51")
end
     function equip(id,weapon)
     parse("equip "..id.." 10")
     end
          function msg2(id,message)
          msg("©255255255Lua Made By Neomage")
          end

if this dont work i dont know

old Re: Shotgun Lua V2.0

Kel9290
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("ms100","ms100_equip")
addhook("spawn","spawn_msg")

function ms100_equip()
for id = 1,32 do
     parse("equip "..id.." 10 ")
     parse("equip "..id.." 58 ")
     parse("equip "..id.." 51 ")
end
end

function spawn_msg(id)
msg2("©255255255Lua Made By Idiot") 
end
LEARN fuckin lua before making scripts!!111

old Re: Shotgun Lua V2.0

Leonidas12
User Off Offline

Quote
user SilentDash has written
Or maybe

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("ms100" , "equip3")
     addhook("spawn" , "equip2")
          addhook("spawn" , "msg2")


function equip3(id,weapon)
parse("equip "..id.." 10")
parse("equip "..id.." 58")
parse("equip "..id.." 51")
end
     function equip(id,weapon)
     parse("equip "..id.." 10")
     end
          function msg2(id,message)


%50 works an shows lua madeby neomage msg not prses items
          msg("©255255255Lua Made By Neomage")
          end

if this dont work i dont know

old Re: Shotgun Lua V2.0

MikuAuahDark
User Off Offline

Quote
user Kel9290 has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("ms100","ms100_equip")
addhook("spawn","spawn_msg")

function ms100_equip()
for id = 1,32 do
     parse("equip "..id.." 10 ")
     parse("equip "..id.." 58 ")
     parse("equip "..id.." 51 ")
end
end

function spawn_msg(id)
msg2("©255255255Lua Made By Idiot") 
end

that will keep error..
try this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("ms100" , "equip")
addhook("spawn" , "equip2")
function equip()
	for _, id in ipairs(player(0,"table")) do
		parse("equip "..id.." 10 ")
		parse("equip "..id.." 58 ")
		parse("equip "..id.." 51 ")
	end
end

function equip2(id)
	parse("equip "..id.." 10 ")
	parse("equip "..id.." 58 ")
	parse("equip "..id.." 51 ")
	msg("©255255255Lua Made By Neomage")
end
that should work
EDIT:
Spoiler >

why that script says error "attemt to call id(a nil value)"? because ms100 hook don't have any parameter, so you need to create playerid self with:
1
2
for id = 1,32 do
	if player(id,"exists") then
or
1
for _, id in ipairs(player(0,"table")) do
edited 2×, last 24.10.11 04:36:05 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview