Detect player throwing grenades
#4

You can try to check the weapon ID after the KEY_FIRE is released. (It should work.)

Something like this:

Код:
#define RELEASED(%0) \
	(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

new weaponid = GetPlayerWeapon(playerid);
if(RELEASED(KEY_FIRE) && weaponid == 16)
{
    SendClientMessage(playerid, -1, "granat on the way!");
    return 1;
}
Reply


Messages In This Thread
Detect player throwing grenades - by Manyula - 25.01.2018, 17:46
Re: Detect player throwing grenades - by pollo97 - 25.01.2018, 17:52
Re: Detect player throwing grenades - by Manyula - 25.01.2018, 17:58
Re: Detect player throwing grenades - by Hrb - 25.01.2018, 18:02
Re: Detect player throwing grenades - by Manyula - 25.01.2018, 18:08

Forum Jump:


Users browsing this thread: 1 Guest(s)