Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2248 249 250338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Blacko
User Off Offline

Quote
Hi all, I search the script who allows CT to cross walls, fast please !
And I want a script who allows to choose to build a turret, a double turrets or triple turrets in a menu !
Please help, i need these scripts !
Thanks you !

old I tried to make a hamburger mod (yeah)

Aqua-
User Off Offline

Quote
1
2
3
4
5
6
7
addhook("hit","ham_hit")
function ham_hit(weapon, id, source)
	if(weapon>86) then
		parse("sethealth "..source.." "..player(source,"health")+math.random(10,20))
		msg2(source,"You have eaten a hamburger!")
	end
end

More >

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
addhook("hit","healammo")
function healammo(victim,source,weapon)
     if player(victim,"team") == player(source,"team") then
          if weapon == 75 then
               parse("spawnitem 65 "..player(source,"tilex").." "..player(source,"tiley"))
               return 1
          elseif weapon == 86 then
               parse("spawnitem 61 "..player(source,"tilex").." "..player(source,"tiley"))
               parse("spawnitem 62 "..player(source,"tilex").." "..player(source,"tiley"))
               return 1
          end
     end
end
WHERE snowball crashes there appears bandage
and WHERE hutbomb crashes there appears primary and secondary ammo
AND I NEED Working UNLIMITED GUTBOMBS AND UNLIMITED SNOWBALLS SCRIPT

old Re: Lua Scripts/Questions/Help

RyceR
User Off Offline

Quote
it dont work:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
addhook("startround","randomstart")
function randomstart()
     for id = 1,32 do
          if (player(id,"exists")) then
               local randomuser = math.random(0, 2)
               if randomuser==1 then
                    randomact(id)
               elseif randomuser==2 then
                    -- dont put anything here
               end
          end
     end
end

function randomact(id)
     menu(id,"Title Menu,Button 1,Button 2,Button 3")
end

addhook("menu","randommenu")
function randommenu(id,title,button)
     if title=="Title Menu" then
          if button==1 then
               -- whatever 1
          elseif button==2 then
               -- whatever 2
          elseif button==3 then
               -- whatever 3
          end
     end
end

i wnat it like in multigame... plz help!

old Re: Lua Scripts/Questions/Help

Evool
User Off Offline

Quote
Hello !
I need a little script

Money should be stored in file, next the many should be loaded from this file using USGN.

Money of course is to be displayed at the bottom.

Thanks a lot!

PS. I serached on the File Archive and forum, but have not found

old Re: Lua Scripts/Questions/Help

martis67
User Off Offline

Quote
whats bad i now that stupid but im new at lua:

addhookfunction sethealth(id,health)
     parse("sethealth "..50.." "..health)

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
Soja1997 has written
who can give me unlimited snowballs and unlimited gutbombs


this is for the snowball, it spawns random ammo.
and it includes unlimited snowballs / Gutbombs

1
2
3
4
5
6
7
8
9
10
11
12
addhook("projectile","snow_ammo")
function snow_ammo(id,weapon,x,y)
	if weapon==75 then
		parse("equip "..id.." 75")
		x=math.floor(x/32)
		y=math.floor(y/32)
		local rdmammo = math.random(61, 62)
		parse("spawnitem "..rdmammo.." "..x.." "..y)
	elseif weapon==86 then
		parse("equip "..id.." 86")
	end
end

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
Done.
More >

old setweapon

VaiN
User Off Offline

Quote
Just wondering why the setweapon command doesn't seem to work right.

1
2
parse("equip "..id.." " 32")
parse("setweapon "..id.." 32")

Even though the weapon is displayed the game still acts as though they are wielding the knife. The only way for the weapon to work right is for the player to switch to something else then back (defeating the whole purpose). If they empty a clip the ammo is still burned but they can't even reload until they switch.

I have tried setweapon to knife and then back again, but it still yields the same result. Is this a bug? And is there another way to do it?
edited 1×, last 02.09.10 01:12:19 pm

old Re: Lua Scripts/Questions/Help

VaiN
User Off Offline

Quote
Pikachu xD has written
@VaiN
I can see an extra quotation mark in the script...


yeah sorry that's not my actual script was just an example to show the weapon was already equipped before tying to setweapon

old Re: Lua Scripts/Questions/Help

Aqua-
User Off Offline

Quote
Im trying to make a script for my server that heals you when you hit with a gutbomb, and yeah that doesnt have a return 1 yet but I dont think thats the problem.

More >

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
addhook("projectile","snow_ammo")
function snow_ammo(id,weapon,x,y)
     if weapon==75 then
          parse("equip "..id.." 75")
          x=math.floor(x/32)
          y=math.floor(y/32)
          local rdmammo = math.random(61, 62)
          parse("spawnitem "..rdmammo.." "..x.." "..y)
     elseif weapon==86 then
          parse("equip "..id.." 86")
     end
end

includes unlimited snowballs / Gut bombs

also when you throw the snowball it spawns an Ammo 1 or Ammo 2

(Random)
To the start Previous 1 2248 249 250338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview