[FilterScript] Bomber Plane - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Bomber Plane (
/showthread.php?tid=334283)
Bomber Plane -
Faisal_khan - 14.04.2012
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.
Re: Bomber Plane -
Deanx - 14.04.2012
Very Nice !
Re: Bomber Plane -
iNorton - 14.04.2012
This... is going to be very very useful for my upcoming war roleplay server
But possibly will make our own one ^^.
Good job!
Re: Bomber Plane -
[GF]Logic - 14.04.2012
Nice
Maybe i will use it
Rep + For Effort
Re: Bomber Plane -
Faisal_khan - 14.04.2012
Thanks all!
Re: Bomber Plane -
xXitsgodzillaXx - 14.04.2012
verey impressive! i cant use it, but thats awesome! :P
Re: Bomber Plane -
lordturhan - 14.04.2012
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
Re: Bomber Plane -
Faisal_khan - 14.04.2012
Thanks all!
Re: Bomber Plane -
thefatshizms - 14.04.2012
bluddy awesome FS man keep up the good work
Re: Bomber Plane -
Faisal_khan - 15.04.2012
Thanks all!