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 2337 338 339 Next To the start

old Re: Lua Scripts/Questions/Help

MasterAsp
User Off Offline

Quote
@Fn_Nemesis You can't necessarily change it so that, instead of bullets you get grenade launcher "bullets", but you could make it so that, when you shoot a m4, it creates an explosion a set distance in front of you, or where the bullet hits. So you could do something like this, so that it explodes when it hits a player.

old Re: Lua Scripts/Questions/Help

shironeko
User Off Offline

Quote
omg... i can't turkish or german or any more language except indo and english T_T
how i translate it?
>use web?
>use dictionary?
>find ppl who can translate it?
omg.. my english bad too

old Re: Lua Scripts/Questions/Help

J4x
User Off Offline

Quote
How i make an explosion when i hit another player?

something like
1
2
3
4
5
6
addhook("hit","explosion")
addhook("function","bomb")
function explosion(id)
function bomb(id,action)
if weapon id == 30 then
if action == 1 then --- i dont know what else...
edited 3×, last 27.12.10 10:02:15 pm

old Re: Lua Scripts/Questions/Help

Crash13
User Off Offline

Quote
How to make script! WHO make it from me? pls. (In this script me need to include:[Vips, Mods with attributes(HATS)], vote map pressing "F4" and 3 rounds for all maps, and when a guy takes the flag say it to him:"Go win now!" and destroy supplies if ther are upgraded(and say: Supplies wil be DESTROYED if they are upgraded! with white color!) pls ?

old Lua question

Baofu92
User Off Offline

Quote
I need to do this:

When you buy an handgun (USP for esample) instead of charging the pistol holding pose it make chareges the zombie pose, but only for one handgun not for all.

Can I do this?
edited 2×, last 28.12.10 11:02:14 am

old Error?

maPmaKer
User Off Offline

Quote
Hello. I know this has been discused but tell me once again how to do this:

I want to set the maximum gate fields that can be built using lua, so it would look like this:

parse("mp_building_limit "Gate Field" 777777")

but then it gives error that can't set gate field limit. Please help, where am I wrong?

old Re: Lua Scripts/Questions/Help

DannyDeth
User Off Offline

Quote
1
parse('mp_building_limit "Gate Field" "777777"')
You can't include " in a prse that is using " to contain it's commands. Use a ' in the future

old Help

sixpack
User Off Offline

Quote
-F1r3Z has written
I have a question at lua

1. How to add level that saves when logged in usgn?


Need the rest of the script to tell you...
Else I can't do more than confuse you...

old Re: Lua Scripts/Questions/Help

3RROR
User Off Offline

Quote
How i can make when a X gun shoot's it's sounds 2 different sounds?
Like: The normal shoot sound & some song.
But the song isn't everywhere. Just on a X place near the guy who shoots

old Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function sv_sound3(x,y,sound)
	for i,id in pairs(player(0,"table")) do
		if math.sqrt((x - player(id,"x"))^2 + (y- player(id,"y"))^2) < 300 then
			parse([[sv_sound2 ]]..id..[[ ]]..sound)
		end
	end
end

addhook([[attack]],[[attacker]])
function attacker(id)
	local wpn = player(id,"weapontype")
	if wpn == 1 then --USP?
		sv_sound3(player(id,"x"),player(id,"y"),"sfx/thesound.ogg")
	end
end
idk if it works, did it from scratch.
for "sfx/thesound.ogg" insert the path of your sound file

old Re: Lua Scripts/Questions/Help

weed_muffin
User Off Offline

Quote
CoolioG has written
weed_muffin has written
ohey guys

i have a RP server and it needs multiple things.

1st: i need help with arresting people. like, if you hit someone with a claw, it spawns them to jail? it'd be cool to have a f3 menu with instaequip, actions whitch includes teleport and set arrest point

2nd: i need admin gun mods, like sg552 giving you a shop license, claw arresting and so on.
please help me out?


So, you just don't want any original ideas for your RP server and instead want to use the same old mechanics that have been used for decades.

Good show, Chap. Good show.

thanks, mate.
how about you help me with the imprisonment script, let's say a jailing pistol.
cause i'm working on my map, and some people might even WANT to go to prison.

old Re: Lua Scripts/Questions/Help

J4x
User Off Offline

Quote
Quote
How i make an explosion when i hit a player?

something like
1
2
3
4
5
6
addhook("hit","explosion")
addhook("function","bomb")
function explosion(id)
function bomb(id,action)
if weapon id == 30 then
if action == 1 then --- i dont know what else...


answer plz..

old Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Quote
1
2
3
4
5
6
addhook([[hit]],[[hitteer]])
function hitteer(id,src,wpn,hpd,apd)
	if wpn == 30 then
		parse([[explosion ]]..player(id,"x")..[[ ]]..palyer(id,"y")..[[ 1 1000 ]]..src)
	end
end
To the start Previous 1 2337 338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview