[FilterScript] Bomb - seeks player continously with a nuclear bomb explosion sound!
#1

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;
}
Reply
#2

Nice Brother.Rep for you
Reply
#3

Thanks! Is there any update anyone will like to make this a bit more 'appealing'?
Reply
#4

wola great work! keep it up! and i think it would be great if u used the missile object .
Reply
#5

Hey, thanks, but is there any way you could tell me the ID of the missile object? I tried searching, but to no use.
Reply
#6

Good job it's really good !! But why dont you use missle , it might be better..
Reply
#7

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.
Reply
#8

Very nice, keep up the good work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)