Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 270 71 72338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Zitieren
Blazzingxx hat geschrieben
N-B-K hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
playa slaya hat geschrieben
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...

alt Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Zitieren
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

alt Sounds..

avengerconfig1
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
avengerconfig1 hat geschrieben
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 >

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
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 ?
1× editiert, zuletzt 25.10.09 04:31:00

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
playa slaya hat geschrieben
@ (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

alt Re: Lua Scripts/Questions/Help

BetaM
User Off Offline

Zitieren
mat5b hat geschrieben
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.

alt Superhero Problem

2fast4
User Off Offline

Zitieren
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

alt "admin" lua script

NozliW
User Off Offline

Zitieren
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.

alt Re: Lua Scripts/Questions/Help

JaBoo
User Off Offline

Zitieren
-WiLSoN- hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

DC
Admin Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
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•
2× editiert, zuletzt 26.10.09 14:41:45

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
redefinder hat geschrieben
@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.

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
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)
Zum Anfang Vorherige 1 270 71 72338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht