Airstrike system - Based on Modern Warfare 2 -
Hiddos - 03.12.2010
Okay, I got bored and after a while I decided to release a simple filterscript.
What's it do?
This script lets you choose an area to bomb. It easy to edit all/most values (I #defined 'em ^^) for the optimal experience. I kept it simple, the only functions added are:
pawn Код:
native SetUpPlayerForAirstrike ( playerid ) ; //Used to set up the player to do an airstrike, check the video.
native Airstrike_Init () ; //Inits the script. Can easily be replaced by MapAndreas's standard function.
You MUST use Airstrike_Init() BEFORE using SetUpPlayerForAirstrike or else it WILL NOT WORK!
I suggest you to use Airstrike_Init on a point like OnGameModeInit or OnFilterScriptInit.
What's it look like?
Here's a small video showing multiple times of me using it. I did not test this on an actual server so I don't know about lag!
[ame]http://www.youtube.com/watch?v=IpqxK48NLJU[/ame]
What's its negative side?- This script, just like most of my other releases, use the awesome MapAndreas plugin by the SA-MP development team. The problem is that this plugin may use up to 70MB o' RAM
- This plugin uses a few timers.
What's there to tweak myself?
Obviously, what would a script be worth if you couldn't tweak it easily yourself?
You can tweak the following settings:
pawn Код:
//ALL values below are the STANDARD values. If no values are entered by the user then this will occur.
#define BOMBS 4 //Amount of bombs to be dropped - DO NOT SET THIS TOO HIGH!
#define LOADS 3 //Amount
#define AREA 45 //The Area of Effect in which the bombs will fall. The shape is a square, not a circle.
#define MINIMUM_INTERVAL 3250 // The minimum interval between load drops
#define EXTRA_MAX_INTERVAL 550 // Sort of 'additional' interval
#define EXPLOSION_TYPE 7 //The type of the explosion, check the SA-MP /wiki/Explosion_List for more information.
#define EXPLOSION_RADIUS 8.5 //The radius of the explosion. Dunno if it's worth something but w/e.
Here's some example usage:
pawn Код:
#define BOMBS 8 //8 bombs will be dropped
#define LOADS 1 //There will only be ONE load dropped.
#define AREA 20 //A rather small area.
#define EXPLOSION_TYPE 12 //Explosion type 12, this is the smallest explosion type possible.
#include <airstrike> //You must include the file AFTER you tweak the settings!
This'd result in 8 small explosions in a row. Something like a very small cluster bomb.
Example usage
Here's an example of usage. I highly DISRECOMMEND to use this code as it really SUCKS
shit through a straw
pawn Код:
public OnGameModeInit()
{
Airstrike_Init();
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SetPVarInt(playerid, "Deaths", GetPVarInt(playerid, "Deaths") + 1);
if(killerid != INVALID_PLAYER_ID)
{
SetPVarInt(killerid, "Kills", GetPVarInt(killerid, "Kills") + 1);
if(GetPVarInt(killerid, "Kills") == 3) SendClientMessage(killerid, COLOR_WINTERCOW, "Use /gtfo to launch an airstrike!");
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) // I DO recommend using ZCMD, but this is just an example.
{
if(!strcmp(cmdtext, "/gtfo", true))
{
if(GetPVarInt(playerid, "Kills") >= 3) SetUpPlayerForAirstrike(playerid);
else SendClientMessage(playerid, COLOR_DARKBLUE, "GTFO");
return 1;
}
return 0;
}
Downloads
PasteBin.com
SolidFiles
Credits- Major thanks to RSX for helping me with explaining callback hooking
- Thanks to Y-Less for the tutorial on hooking.
- Thanks as well to the SA-MP development and Kalcor for MapAndreas
PS: I did not do any tests on an actual public server. If you own a public server and would like to do some tests, please contact me.
Re: Airstrike system - Based on Modern Warfare 2 -
Meinstad - 03.12.2010
Sweet, I'll test it out!
Re: Airstrike system - Based on Modern Warfare 2 -
WillyP - 03.12.2010
Sexy Hiddy!
Re: Airstrike system - Based on Modern Warfare 2 -
Hiddos - 03.12.2010
Thanks, added an example usage and a notice to use Airstrike_Init() before using.
Re: Airstrike system - Based on Modern Warfare 2 -
The_Moddler - 03.12.2010
Nice man!
Re: Airstrike system - Based on Modern Warfare 2 -
Hiddos - 03.12.2010
Quote:
Originally Posted by The_Moddler
Nice man!
|
Thanks. I just found a wrong comment mark ("/" instead of "/*") in the include. Fixed, correct versions have been uploaded.
Re: Airstrike system - Based on Modern Warfare 2 -
Dany23 - 03.12.2010
hmmm nice 9/10
Re: Airstrike system - Based on Modern Warfare 2 -
Dime - 03.12.2010
Cool
voted too
Re: Airstrike system - Based on Modern Warfare 2 -
TheDeadLY - 03.12.2010
CooL, But You Could Of Maked A Missile That Flys And Hits The Ground. It Would Of LooK Realy Cool But This version Is Quite Good
Re: Airstrike system - Based on Modern Warfare 2 -
Kitten - 03.12.2010
Very nice try making a ac130 if u can ur freakin c00l
Re: Airstrike system - Based on Modern Warfare 2 -
WillyP - 03.12.2010
Quote:
Originally Posted by TheDeadLY
CooL, But You Could Of Maked A Missile That Flys And Hits The Ground. It Would Of LooK Realy Cool But This version Is Quite Good
|
I Would Recommend You Not To Talk Like This
Re: Airstrike system - Based on Modern Warfare 2 -
scripter1 - 03.12.2010
This is great!
Re: Airstrike system - Based on Modern Warfare 2 -
WillyP - 03.12.2010
Quote:
Originally Posted by Kitten
Very nice try making a ac130 if u can ur freakin c00l
|
I'll make a FS later.
Re: Airstrike system - Based on Modern Warfare 2 -
The_Gangstas - 04.12.2010
wtf?
[00:01:49] MapAndreas: plugin could not init!
[00:01:49] MapAndreas: check files and make sure you have enough memory!
Re: Airstrike system - Based on Modern Warfare 2 -
Scenario - 04.12.2010
This is pretty "bad ass" if you ask me, great job man.
Re: Airstrike system - Based on Modern Warfare 2 -
Retardedwolf - 04.12.2010
Quote:
Originally Posted by The_Gangstas
wtf?
[00:01:49] MapAndreas: plugin could not init!
[00:01:49] MapAndreas: check files and make sure you have enough memory!
|
Your computer sucks.
Re: Airstrike system - Based on Modern Warfare 2 -
Steven82 - 04.12.2010
Quote:
Originally Posted by Retardedwolf
Your computer sucks.
|
Lol, anyways this is very nice
i love this!!!
Re: Airstrike system - Based on Modern Warfare 2 -
DevilG - 04.12.2010
Wow, nice release, Hiddos!
Re: Airstrike system - Based on Modern Warfare 2 -
Hiddos - 04.12.2010
Quote:
Originally Posted by The_Gangstas
wtf?
[00:01:49] MapAndreas: plugin could not init!
[00:01:49] MapAndreas: check files and make sure you have enough memory!
|
Check if you have 'SAfull.hmap' in your scriptfiles directory, MapAndreas.(so/dll) in your plugins directory and added the MapAndreas plugin to the server configuration (server.cfg).
Thanks for the other positive replies ^^
Re: Airstrike system - Based on Modern Warfare 2 -
WillyP - 04.12.2010
Would you mind if I took some shizzle from here for my FS? What Kitten asked I'll probablies make cause I aint got anything else to do
(I'll give you credits in the FS)