[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


Messages In This Thread
Bomber Plane - by Faisal_khan - 14.04.2012, 13:00
Re: Bomber Plane - by Deanx - 14.04.2012, 13:02
Re: Bomber Plane - by iNorton - 14.04.2012, 13:08
Re: Bomber Plane - by [GF]Logic - 14.04.2012, 13:09
Re: Bomber Plane - by Faisal_khan - 14.04.2012, 14:01
Re: Bomber Plane - by xXitsgodzillaXx - 14.04.2012, 14:26
Re: Bomber Plane - by lordturhan - 14.04.2012, 15:03
Re: Bomber Plane - by Faisal_khan - 14.04.2012, 16:40
Re: Bomber Plane - by thefatshizms - 14.04.2012, 16:41
Re: Bomber Plane - by Faisal_khan - 15.04.2012, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)