SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Includes (https://forum.sa-mp.com/forumdisplay.php?f=83)
-   -   [Include] Extended Grenade (https://forum.sa-mp.com/showthread.php?t=669740)

AbyssMorgan 02/10/2019 09:01 AM

Extended Grenade
 
Hello, I would like to present you the Extended Granade.

Video:
https://www.youtube.com/watch?v=wlFEwpE0j7k

Functions:
PHP Code:

Grenade::IsWeaponEnable(playerid,special_weaponid);
Grenade::WeaponEnable(playerid,special_weaponid,bool:enable);
Grenade::GetSpecialAmmo(playerid,special_weaponid);
Grenade::SetSpecialAmmo(playerid,special_weaponid,ammo);
Grenade::GetEffectID(playerid,special_weaponid);
Grenade::SetEffectID(playerid,special_weaponid,effectid);
Grenade::GetDamage(playerid,special_weaponid);
Grenade::SetDamage(playerid,special_weaponid,Float:damage);
Grenade::GetVehicleDamage(playerid,special_weaponid);
Grenade::SetVehicleDamage(playerid,special_weaponid,Float:damage);
Grenade::GetTime(playerid,special_weaponid);
Grenade::SetTime(playerid,special_weaponid,seconds);
Grenade::IsToggleGasMask(playerid);
Grenade::ToggleGasMask(playerid,bool:toggle);
 
Grenade::GetSpecialWeaponID(weaponid);
Grenade::CreateGrenadeEffect(playerid,special_weaponid,Float:x,Float:y,Float:z);
Grenade::DestroyEffect(mobid); 

Definitions:
PHP Code:

MAX_GRENADE_EFFECT

GRENADE_DOT_TEAR_GAS
GRENADE_DOT_FIRE

GRENADE_EFFECT_TIME

GRENADE_DEFAULT_PLAYER_DAMAGE
GRENADE_DEFAULT_VEHICLE_DAMAGE

INVALID_GRENADE_ID

//death reason
WEAPON_SUFFOCATION
WEAPON_NAPALM

GRENADE_MAX_SPECIAL_WEAPON

GRENADE_SPECIAL_WEAPON_NONE
GRENADE_SPECIAL_WEAPON_GRENADE
GRENADE_SPECIAL_WEAPON_TEARGAS
GRENADE_SPECIAL_WEAPON_MOLTOV

GRENADE_EFFECT_NONE

GRENADE_EFFECT_CLUSTER_BOMB_1
GRENADE_EFFECT_CLUSTER_BOMB_2
GRENADE_EFFECT_CLUSTER_BOMB_3
GRENADE_EFFECT_CLUSTER_BOMB_4
GRENADE_EFFECT_BANG_GRENADE

GRENADE_EFFECT_SMALL_SMOKE
GRENADE_EFFECT_HUGE_SMOKE_1
GRENADE_EFFECT_HUGE_SMOKE_2
GRENADE_EFFECT_HUGE_SMOKE_3

GRENADE_EFFECT_NAPALM 

Download:
ExtendedGrenade.inc
3DTryg.inc Thread
ColAndreas Plugin

Non-Registered Users:
Bug Report

Gammix 02/10/2019 10:37 AM

Re: Extended Grenade
 
Does this works when a grenade bounces of a surface or wall?

AbyssMorgan 02/10/2019 10:43 AM

Re: Extended Grenade
 
Quote:

Originally Posted by Gammix (Post 4115828)
Does this works when a grenade bounces of a surface or wall?

Sometimes this is still prototype grenade detection
https://www.youtube.com/watch?v=xjMHYBKYo1g

cSharp 02/10/2019 10:43 AM

Re: Extended Grenade
 
Quote:

Originally Posted by AbyssMorgan (Post 4115006)
Currently no collision check, but prototype work fine
https://www.youtube.com/watch?v=otHLzxZdjiE

Would be nice to know if you've changed on this.

EDIT: timing is unreal.



Either way, great release, 5 stars from me.

Markski 04/10/2019 08:19 PM

Re: Extended Grenade
 
This is some of the best stuff I've ever seen. I feel foolish for saying it'd be impossible in the thread that asked for this - Excelent work from you as usual.

AbyssMorgan 08/10/2019 05:57 PM

Re: Extended Grenade
 
Update v1.1.0:

- Renamed function:
PHP Code:

Grenade::CreateGrenadeEffect -> Grenade::GrenadeEffectByPlayer 

- Added functions:
PHP Code:

Grenade::IsToggleGasMask(playerid);
Grenade::ToggleGasMask(playerid,bool:toggle);
 
//special update for Missile Launcher
Grenade::CreateGrenadeEffect(special_weaponid,effectid,Float:x,Float:y,Float:z,worldid,interiorid,playerid,Float:streamdistance,Float:damage,Float:veh_damage,active_time=25,byplayerid=INVALID_PLAYER_ID); 

- Added kill detection: WEAPON_SUFFOCATION, WEAPON_NAPALM

- Fixed DOT in vehicle

RogueDrifter 07/11/2019 04:16 PM

Re: Extended Grenade
 
Okay, wow. Amazing. Great. Creative. New. Unique.


All times are GMT. The time now is 01:50 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.