[FilterScript] Bomber Plane
#1

Bomber
Hi guyz this is my second filterscript. I think I did not pleased you all with my first [FilterScript] Moving Ship . So this one I made for you guyz think this may please you all. I made this in 1 day with simple function CreateExplosion() and a tricky function MapAndreas_FindZ_For2DCoord(). This is a plugin which is useful for finding the highest Z co-ordinate that is finding the exact Z cor-ordinate of the create where our explosion would be created. But you need to download this plugin. Here we go with the explanation:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_HANDBRAKE)
    {
        if (IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 476)
        {
            return SendClientMessage(playerid, 0xFF0000AA, "");
        }
        else
        {
            new Float:VBPos[3];
            GetVehiclePos(GetPlayerVehicleID(playerid),VBPos[0],VBPos[1],VBPos[2]);
            MapAndreas_FindZ_For2DCoord(VBPos[0], VBPos[1], VBPos[2]);
            CreateExplosion(VBPos[0], VBPos[1], VBPos[2], 7, 20.0);
            SendClientMessage(playerid, 0xFF0000AA, "KABOOM!!");
        }
        return 1;
    }
    return 1;
}
This is how we created it. Now let me show you how we got the lowest Z co-ordinate using the plugin MapAndreas.
First we need to find the Z co-ordinate here we got a function:
pawn Код:
MapAndreas_FindZ_For2DCoord(VBPos[0], VBPos[1], VBPos[2]);
This will give us the lowest Z co-ordinate.
Now its simple to create an explosion:
pawn Код:
CreateExplosion(VBPos[0], VBPos[1], VBPos[2], 7, 20.0);
Then we added this for our bomb to work only in Rustler:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) != 476)
    {
        return SendClientMessage(playerid, 0xFF0000AA, "");
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "You entered in a Bomber plane press Space to drop big bomb.");
        return 1;
    }
}
Screenshots




That’s all hope you like it.

Credits

Faisal_khan – For scripting all thing.
Kalcor aka Kye – For his awesome plugin MapAndreas [Plugin] MapAndreas plugin v1.0 beta.

Pastebin
BOMBER

MediaFire
Reply
#2

Very Nice !
Reply
#3

This... is going to be very very useful for my upcoming war roleplay server

But possibly will make our own one ^^.
Good job!
Reply
#4

Nice
Maybe i will use it

Rep + For Effort
Reply
#5

Thanks all!
Reply
#6

verey impressive! i cant use it, but thats awesome! :P
Reply
#7

Very nice release i was thinking to make something like this but i didn't now how to make it i will use this for sure!

+rep
Reply
#8

Thanks all!
Reply
#9

bluddy awesome FS man keep up the good work
Reply
#10

Thanks all!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)