![]() |
|
[Server] How to get the exacly pos where a bomb drops? - Printable Version +- open.mp forum (https://forum.open.mp) +-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) +--- Forum: Support (https://forum.open.mp/forumdisplay.php?fid=12) +--- Thread: [Server] How to get the exacly pos where a bomb drops? (/showthread.php?tid=1926) |
How to get the exacly pos where a bomb drops? - annety - 2021-04-20 I want to make a server with a good PvP like CS-GO For that i need to make good granades: like smoke,flash,molotov The effect i can manage to do by using textdraws, create explosion, drunk effect... But there is only a thing i need someone with more expirience to help me: How to get the exacly position where bombs when players throw? To create that flashbang,smoke,molotov effect... How to get it? RE: How to get the exacly pos where a bomb drops? - AbyssMorgan - 2021-04-20 SA:MP dont have function for detect bomb/grenade position, 3DTryg library has a callback that estimates such positions for grenades You can use this script with ColAndreas for get flashbang, smoke, molotov effect. C4 bomb not suported. https://www.burgershot.gg/showthread.php?tid=1908 RE: How to get the exacly pos where a bomb drops? - annety - 2021-04-21 (2021-04-20, 02:58 PM)AbyssMorgan Wrote: SA:MP dont have function for detect bomb/grenade position, 3DTryg library has a callback that estimates such positions for grenades Hmmm ty... so this?[color=#be2026][size=small][font=Roboto]3DTryg.inc?do the stuff? I don't want all that stuff... How can i get just the pos? Like this: Code: public OnPlayerDroppingGrenade(playerid,weaponid,Float:x,Float:y,Float:z){
new string[128];
format(string, sizeof string, "playerid[%i],weaponid[%i],x[%f],y[%f],z[%f]", playerid,weaponid,x,y,z);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}RE: How to get the exacly pos where a bomb drops? - annety - 2021-04-26 My bad, i didn't saw that i have to use the hole ExtendedGrenade lib... How to use this? How to when player throw the gun 17 and smoketype[playerid] if it is 1, effect X if it is 2, effect Y How to create those effects there? RE: How to get the exacly pos where a bomb drops? - AbyssMorgan - 2021-04-27 (2021-04-26, 08:38 AM)annety Wrote: My bad, i didn't saw that i have to use the hole ExtendedGrenade lib... Manual usage: Code: 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);active_time in seconds special_weaponid Code: GRENADE_SPECIAL_WEAPON_NONE
GRENADE_SPECIAL_WEAPON_GRENADE
GRENADE_SPECIAL_WEAPON_TEARGAS
GRENADE_SPECIAL_WEAPON_MOLTOVeffectid Code: 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_NAPALMYou still can use internal functions for set player special weapon https://www.burgershot.gg/showthread.php?tid=1908 |