Forum

> > CS2D > Scripts > :notok:
Forums overviewCS2D overview Scripts overviewLog in to reply

English :notok:

19 replies
To the start Previous 1 Next To the start

old :notok:

Danilwra
User Off Offline

Quote
×
edited 1×, last 29.05.19 01:08:44 pm

old Re: :notok:

The Gajos
BANNED Off Offline

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

old Re: :notok:

The Gajos
BANNED Off Offline

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

old Re: :notok:

The Gajos
BANNED Off Offline

Quote
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).
edited 1×, last 24.05.15 08:00:04 pm

old Re: :notok:

The Gajos
BANNED Off Offline

Quote
@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.
edited 1×, last 24.05.15 08:02:23 pm

old Re: :notok:

Talented Doge
User Off Offline

Quote
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

old Re: :notok:

Talented Doge
User Off Offline

Quote
Yes i know, that's why i say that is only for checking grenade or not.

old Re: :notok:

Rainoth
Moderator Off Offline

Quote
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

old Re: :notok:

The Gajos
BANNED Off Offline

Quote
Here you go:
CODE >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview