Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Support [Server] How to get the exacly pos where a bomb drops?

 
  • 0 Vote(s) - 0 Average
Server How to get the exacly pos where a bomb drops?
annety
Offline

Burgershot Member
Posts: 25
Threads: 6
Joined: Mar 2021
Reputation: 0
#1
2021-04-20, 06:03 AM
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?
AbyssMorgan
Offline

Burgershot Member
Posts: 63
Threads: 25
Joined: Apr 2021
Reputation: 8
Location: Poland
#2
2021-04-20, 02:58 PM
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
annety
Offline

Burgershot Member
Posts: 25
Threads: 6
Joined: Mar 2021
Reputation: 0
#3
2021-04-21, 07:04 AM (This post was last modified: 2021-04-21, 07:05 AM by annety.)
(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;
}
annety
Offline

Burgershot Member
Posts: 25
Threads: 6
Joined: Mar 2021
Reputation: 0
#4
2021-04-26, 08:38 AM
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?
AbyssMorgan
Offline

Burgershot Member
Posts: 63
Threads: 25
Joined: Apr 2021
Reputation: 8
Location: Poland
#5
2021-04-27, 03:08 PM (This post was last modified: 2021-04-27, 03:10 PM by AbyssMorgan.)
(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
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode