SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 23/02/2013, 08:14 AM   #1
RajatPawar
High-roller
 
RajatPawar's Avatar
 
Join Date: Aug 2011
Location: ヽ༼ຈل͜ຈ༽ノ
Posts: 2,177
Reputation: 320
Default Bomb - seeks player continously with a nuclear bomb explosion sound!

Hey! This is a simple FS.
/pdropbomb (playerid/name) to drop the bomb on a player. Only for admins.
Players are warned when the bomb is dropped (No use, it seeks the player continously, updating the player pos with a timer of 500 ms.)
It drops and there's a huge explosion around! Also, there's a sound that plays! Almost perfectly synced - depends on the player's connection. I personally like the sound, haha! Also, the object that is dropped can be redefined.
pawn Code:
#define OBJECT 14566
Change this object to whatever you want the 'bomb' to be. Currently, it's a ball like thing.
Here's a video about it:

[ame]www.youtube.com/watch?v=4N4bxq2c4qE[/ame]

Credits:
Zeex - zcmd.
****** - sscanf.
Sa cam hack.
Thanks!

pawn Code:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define OBJECT 14566
new missile;
new bool:ismon = false;
new Float: Pos[3];

CMD:pdropbomb(playerid, params[])
{
    new target;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
    if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "USAGE: /pdropbomb (playerid/name)");
    if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player not connected.");
    else
    {
    GetPlayerPos(target, Pos[0], Pos[1], Pos[2]);
    missile = CreateObject(OBJECT, Pos[0], Pos[1]+2, Pos[2]+200, 0, 0, 1000, 1000);
    SetTimerEx("move", 100, 1, "d", target);
    SetObjectRot(missile, 0, 0, 1000);
    SendClientMessage(playerid, -1, "Done!");
    GameTextForAll("There is a missile headed~n~one of you's way. ~r~Beware.", 5000, 5);
    SetTimerEx("explode", 100, 1, "d", playerid);
    SetTimerEx("play",1000, 0, "d", playerid);
    ismon = true;
    }
    return 1;
}

forward public play(playerid);
public play(playerid)
{
PlayAudioStreamForPlayer(playerid, "http://macros.featurecam.com/bomb.wav", 0.0, 0.0, 0.0, 50.0, 0);
return 1;
}

forward public move(target);
public move(target)
{
    GetPlayerPos(target, Pos[0], Pos[1], Pos[2]);
    MoveObject(missile,Pos[0], Pos[1], Pos[2], 30, 0, 0, 1000);
    return 1;
}

forward public explode(playerid);
public explode(playerid)
{
    if(ismon == true)
    {
        new Float: oX, Float: oY, Float: oZ;
        GetObjectPos(missile, oX, oY, oZ);
        if(Pos[2]  == oZ )
        {
            DestroyObject(missile);
            SendClientMessage(playerid, -1, "BOOM!");
           
            for(new i; i<50; i++)
            {
                CreateExplosion(oX+i, oY+i, oZ, 6, 100);
                ismon = false;
               
            }
           
           
        }
    }
    return 1;
}
RajatPawar is offline   Reply With Quote
Old 23/02/2013, 09:19 AM   #2
Gamer_007
Gangsta
 
Gamer_007's Avatar
 
Join Date: Dec 2011
Location: Connecting...
Posts: 670
Reputation: 11
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

Nice Brother.Rep for you
Gamer_007 is offline   Reply With Quote
Old 24/02/2013, 12:54 PM   #3
RajatPawar
High-roller
 
RajatPawar's Avatar
 
Join Date: Aug 2011
Location: ヽ༼ຈل͜ຈ༽ノ
Posts: 2,177
Reputation: 320
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

Thanks! Is there any update anyone will like to make this a bit more 'appealing'?
RajatPawar is offline   Reply With Quote
Old 24/02/2013, 01:08 PM   #4
XtremeR
Gangsta
 
XtremeR's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 867
Reputation: 565
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

wola great work! keep it up! and i think it would be great if u used the missile object .
__________________
XtremeR is offline   Reply With Quote
Old 24/02/2013, 01:24 PM   #5
RajatPawar
High-roller
 
RajatPawar's Avatar
 
Join Date: Aug 2011
Location: ヽ༼ຈل͜ຈ༽ノ
Posts: 2,177
Reputation: 320
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

Hey, thanks, but is there any way you could tell me the ID of the missile object? I tried searching, but to no use.
RajatPawar is offline   Reply With Quote
Old 24/02/2013, 01:28 PM   #6
Arnold_Collins
Huge Clucker
 
Arnold_Collins's Avatar
 
Join Date: Oct 2011
Location: Durres, Albania
Posts: 247
Reputation: 19
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

Good job it's really good !! But why dont you use missle , it might be better..
Arnold_Collins is offline   Reply With Quote
Old 24/02/2013, 01:36 PM   #7
RajatPawar
High-roller
 
RajatPawar's Avatar
 
Join Date: Aug 2011
Location: ヽ༼ຈل͜ຈ༽ノ
Posts: 2,177
Reputation: 320
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

Quote:
Originally Posted by Rajat_Pawar View Post
Hey, thanks, but is there any way you could tell me the ID of the missile object? I tried searching, but to no use.
I ******d, only found missile launchers and rocket launchers.
RajatPawar is offline   Reply With Quote
Old 24/02/2013, 07:00 PM   #8
Katashi
Little Clucker
 
Join Date: Feb 2013
Posts: 1
Reputation: 0
Default Re: Bomb - seeks player continously with a nuclear bomb explosion sound!

Very nice, keep up the good work.
Katashi 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
[FilterScript] Realistic Nuclear Bomb Script blackwidow18 Filterscripts 23 08/08/2015 09:16 PM
[FilterScript] Nuclear Bomb (Nuke) wumpyc Filterscripts 11 17/11/2011 01:59 PM
nuclear bomb Headshot1108 Help Archive 4 06/04/2010 12:46 PM
Atomic Bomb explosion Jackman Help Archive 1 18/02/2010 02:56 PM
nuclear bomb Jason_Borne420 Help Archive 3 10/10/2009 09:15 PM


All times are GMT. The time now is 01:53 PM.


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