• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Server] How to get the exacly pos where a bomb drops?
#1
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?
  Reply
#2
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
  Reply
#3
(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
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

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;
}
  Reply
#4
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?
  Reply
#5
(2021-04-26, 08:38 AM)annety Wrote: 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?



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_MOLTOV



effectid

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_NAPALM



You still can use internal functions for set player special weapon

https://www.burgershot.gg/showthread.php?tid=1908
  Reply


Forum Jump: