Forum

> > CS2D > Scripts > :notok:
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch :notok:

19 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt :notok:

Danilwra
User Off Offline

Zitieren
×
1× editiert, zuletzt 29.05.19 13:08:44

alt Re: :notok:

The Gajos
BANNED Off Offline

Zitieren
You have to collect all "attack" actions to table then you will be able to get something you declare in function.

alt Re: :notok:

The Gajos
BANNED Off Offline

Zitieren
Do you mean that you want to know what grenade type was used a moment ago?

alt Re: :notok:

The Gajos
BANNED Off Offline

Zitieren
I said about it before:
Spoiler >

Do you also want to collect shots of guns or only of grenades?

I can make it for you when I will have a time (I'm not sure if tomorrow because whole day is bugged).
1× editiert, zuletzt 24.05.15 20:00:04

alt Re: :notok:

The Gajos
BANNED Off Offline

Zitieren
@user Talented Doge: He would to use function like: lastAction(id) and return e.g.: HE.
If you have time write for him this because I'm bussy.
1× editiert, zuletzt 24.05.15 20:02:23

alt Re: :notok:

Talented Doge
User Off Offline

Zitieren
That may be done by using second hook.

If you simply wanna check if the player used grenade or not, use this.

1
2
3
4
5
6
7
8
p_w = {}

addhook("attack", "_atk")

function _atk(p)
	p_w[p] = player(p, "weapontype")
	-- anything else
end

alt Re: :notok:

Rainoth
Moderator Off Offline

Zitieren
Your title does not describe your problem properly! Change it.
If you had a decent title we would know if you want to know one thing or another.
If you want to know when the projectile lands, you'll have to use cs2d lua hook projectile hook.
If you want to know when the player launches projectile, you'll have to use cs2d lua hook attack

alt Re: :notok:

The Gajos
BANNED Off Offline

Zitieren
Here you go:
CODE >

alt Re: :notok:

The Gajos
BANNED Off Offline

Zitieren
user Danilwra hat geschrieben
How to find out what the thing was used by the player ?

user Danilwra hat geschrieben
this is not necessary

no comments, free work
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht