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 270 71 72338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Quote
Blazzingxx has written
N-B-K has written
Come on, pleeease xD.
Im not going to do anything bad!!

by pm at least

good luck

He's thinking that you are going to make miserable stuff with it...
Flaco is right.

Removing is minor function which shouldn't appear in your hands.


im not goint to make anything miserable -.-.

Well i have no problem if u dont give me the code...

good luck

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
playa slaya has written
it does not matter anymore i fixed i forgot a simple thing

but i need to know is it possible to do this?:
1
2
3
4
addhook('hit','hitme')
function hitme(id,[b]attacker[/b],[b]victim[/b])
	<Script>
end

@Playa Slaya, you should look through hook parameters.
Its (id,attacker,wpn,x,y)

I though you have at least a bit skills...

old Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Quote
function hitme(victim,attacker,wpn,x,y)
The order of the parameters is the important thing, not how you call them.
You could also call this:
function hitme(attacker,victim,wpn,x,y) but then the variable attacker would be the ID of the victim and the varaible victim would be the ID of the attacker. If you like to confuse people who read your script, this is a very effective idea, but otherwise it's not very practical

old Sounds..

avengerconfig1
User Off Offline

Quote
How i play sounds in the moment will i enter the server :
AvengerConfig1 connected to server and sounds play trayken in the moment please help me

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
avengerconfig1 has written
How i play sounds in the moment will i enter the server :
AvengerConfig1 connected to server and sounds play trayken in the moment please help me

I don't think join hook is best for it.
So I suggest to use it in team hook.

Example (Look through spoiler):
Spoiler >

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
hi
i've got this
1
2
3
4
5
6
addhook("reload","nr")
function nr(p,m)
	if m==1 then
		m==2
	end
end
it doesn't work what's wrong
Sorry about this noob question i'm just beginning to learn :S.
Also is it possible to make a max of players on a team. ex:
ct has 6 players[max]and someone joins ct but when he spawns he goes to T is it possible ?
edited 1×, last 25.10.09 04:31:00 am

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
playa slaya has written
@ (mostly) Blazzingxx:
(
How do you make the .txt files open in game i ask mainly you because you have done this)

As you know, U.S.G.N. data files you can:
1
2
3
4
5
6
-- Open File
io.open()
-- Close File
close()
-- Write File
write()

~~ Short Example For Opening Text File ~~
Thats how looks different part from U.S.G.N saves.
1
2
3
4
5
6
7
8
9
10
11
local news_line = {}
f = io.open('news.txt','r')

if (f ~= nil) then
	local i = 0
	for line in f:lines() do
		i = i + 1
		news_line[i] = line
	end
	f:close()
end

old Re: Lua Scripts/Questions/Help

BetaM
User Off Offline

Quote
mat5b has written
Excuse me, I have a small thought about a problem.
Spoiler >

It seems to be ok, but when the player should spawn (spawnplayer) it doesn't do anything (it makes the person to ct/t but nothing more).


Once again, the same question.

old Superhero Problem

2fast4
User Off Offline

Quote
Hi! I have a problem with the Superhero Mod....

I like to create a dedicated server, but when I create the dedicated server and try enter in "Find Server" this don' appear!!!

PLs help me!!

Or somebody upload his CS2D with "Dedicated Server tool" and the SuperHero Mod all configured...

Can upload it in www.rapidshare.com or www.megaupload.com

2fast4

old "admin" lua script

NozliW
User Off Offline

Quote
how can i make someone admin with lua script (with his/her usgn id) ?also that admis say something (example "give weapons") and they receive laser,rpg,flamethrower,etc.

old Re: Lua Scripts/Questions/Help

JaBoo
User Off Offline

Quote
-WiLSoN- has written
how can i make someone admin with lua script (with his/her usgn id) ?also that admis say something (example "give weapons") and they receive laser,rpg,flamethrower,etc.


AMX2D is better than that script personally.
You can do much more

old Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Quote
you don't need to use the amx2d scripts for that. you can easily script that yourself (If you want to learn it).

have a look at the sample scripts sys/lua/samples/sayfunctions.lua

it does stuff by saying things in the chat. you can combine this principle with Lua commands like player(id,"usgn") which returns the usgn id of a player or 0 if this player is not logged in. for details read sys/lua/info.txt

also note: you can do everything what amx2d can do with plain Lua as well (since amx2d is just a collection of Lua scripts). it's wrong to say that you can do more with it - but you can do some things easier

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
Hi.I`m making some lua scripts and I want to ask some questions about my lua scripts :
>Snowball fight script:How can i make unlimited snowballs,like when i throw them i never run out of snowballs.

>Football script:Can i pass the ball(snowball)to other players?,is that possible?

>ZombieSwarm script :@Blazzingxx:I tried to make prices on weapon menu but it just doesn`t work.Can you help me make the menu instead of money,to buy with zs points.Both Survivors and Zombies have zs points huds that shows them their current points.A player gets 1 zs point for each kill•
edited 2×, last 26.10.09 02:41:45 pm

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
redefinder has written
@Blazzingxx:I tried to make prices on weapon menu but it just doesn`t work.Can you help me make the menu instead of money,to buy with zs points.Both Survivors and Zombies have zs points huds that shows them their current points.A player gets 1 zs point for each kill•

I will make you new buy menu, just wait because I'm working on bit funny project.

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
Is it possible to:
• Make a max of players on a team.Ex:
ct has 5 players(max)and someone joins ct but when he spawns he goes to T
And how to:
• Configure script settings with .cfg file
(Like Blazzingxx SH or GG)
To the start Previous 1 270 71 72338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview