SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/12/2019, 05:47 PM   #11
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 258
Reputation: 6
Default Re: how to detect the pos where bomb drops?

bump
binnyl is offline   Reply With Quote
Old 09/12/2019, 09:37 AM   #12
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 609
Reputation: 54
Default Re: how to detect the pos where bomb drops?

make sure that your colandreas version is compatible with your sa-mp version
__________________
coool is offline   Reply With Quote
Old 11/12/2019, 03:59 AM   #13
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 258
Reputation: 6
Default Re: how to detect the pos where bomb drops?

Quote:
Originally Posted by coool View Post
make sure that your colandreas version is compatible with your sa-mp version
I was not using this

I was just using this:
Code:
// granade pos 1 (projetil)
#include <projectile>
new projetilSmoke, projetilFlash;
Code:
        // granade pos 2 (projetil)
        else if(newkeys & KEY_FIRE && IsAGrenade(GetPlayerWeapon(playerid)) )
        {
            if(SWthrow[playerid] == 17 && SWthrowTYPE[playerid] == 1 || SWthrowTYPE[playerid] == 2)
            {
                new Float:x,Float:y,Float:z, Float:vx,Float:vy,Float:vz;
                GetPlayerVelocity(playerid,vx,vy,vz);
                GetPlayerPos(playerid,x,y,z); //because we want to create the bomb from player's position.
                if(SWthrow[playerid] == 17 && SWthrowTYPE[playerid] == 1) projetilSmoke = CreateProjectile(x,y,z,vx,vy,vz); //You have to obtain velocity (vx, vy, vz) yourself.
                else if(SWthrow[playerid] == 17 && SWthrowTYPE[playerid] == 2) projetilFlash = CreateProjectile(x,y,z,vx,vy,vz); //You have to obtain velocity (vx, vy, vz) yourself.
                // remover granadas
                if(SWthrow[playerid] >= 16 && SWthrow[playerid] <= 18) SetTimerEx("removerGranada", 500, 0, "iii", playerid, SWthrow[playerid], SWthrowTYPE[playerid]);
            }
        }
Code:
// granade pos 3
public OnProjectileStop(projid)
{
    new Float:x, Float:y, Float:z;
    GetProjectilePos(projid, x, y, z); //Now x, y, z is the location where the bomb has dropped.
    // smoke grenade
    if (projid==projetilSmoke)
        SetTimerEx("PlantarSmoke2", 500, 0, "ifffi", 65535, x, y, z, 2);
    // flash bang
    else if (projid==projetilFlash)
        SetTimerEx("DropFlashBang", 2000, 0, "fff", x, y, z);
}
forward removerGranada(playerid, imodel, itype);
public removerGranada(playerid, imodel, itype) {
    RemovePlayerItem(playerid, imodel, itype, 0);
    AtualizarAmmoTD(playerid, imodel, false);
}
It isn't just a plugin?
https://github.com/Pottus/ColAndreas/releases

There is a include?
binnyl is offline   Reply With Quote
Old 19/12/2019, 10:02 PM   #14
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 258
Reputation: 6
Default Re: how to detect the pos where bomb drops?

bump
binnyl is offline   Reply With Quote
Old 28/12/2019, 01:48 PM   #15
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 258
Reputation: 6
Default Re: how to detect the pos where bomb drops?

bump
binnyl is offline   Reply With Quote
Old 28/12/2019, 02:00 PM   #16
coool
Gangsta
 
coool's Avatar
 
Join Date: Feb 2013
Location: Republic of Pakistan
Posts: 609
Reputation: 54
Default Re: how to detect the pos where bomb drops?

Have you made sure that colandreas is compatible with your sa-mp version?
__________________
coool is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
when i plant 2 bomb, and defuse the number 2 bomb, my bomb 1 got defused too MiyuUchiha Scripting Help 3 10/07/2017 07:59 AM
FPS Drops Warlord Client Support 4 20/10/2015 05:50 PM
[FilterScript] Bomb - seeks player continously with a nuclear bomb explosion sound! RajatPawar Filterscripts 7 24/02/2013 08:00 PM
/bomb = Activate Car Bomb DeltaAirlines12 Scripting Help 3 28/10/2012 07:09 PM
I want make the bomb . someone to stand on the spot, a bomb would work. uplovethai Help Archive 4 29/10/2009 03:19 PM


All times are GMT. The time now is 03:40 PM.


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