[Include] Airstrike system - Based on Modern Warfare 2
#1

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

Sweet, I'll test it out!
Reply
#3

Sexy Hiddy!
Reply
#4

Thanks, added an example usage and a notice to use Airstrike_Init() before using.
Reply
#5

Nice man!
Reply
#6

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

hmmm nice 9/10
Reply
#8

Cool voted too
Reply
#9

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
Reply
#10

Very nice try making a ac130 if u can ur freakin c00l
Reply
#11

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
Reply
#12

This is great!
Reply
#13

Quote:
Originally Posted by Kitten
Посмотреть сообщение
Very nice try making a ac130 if u can ur freakin c00l
I'll make a FS later.
Reply
#14

wtf?


[00:01:49] MapAndreas: plugin could not init!
[00:01:49] MapAndreas: check files and make sure you have enough memory!
Reply
#15

This is pretty "bad ass" if you ask me, great job man.
Reply
#16

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

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Your computer sucks.
Lol, anyways this is very nice i love this!!!
Reply
#18

Wow, nice release, Hiddos!
Reply
#19

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 ^^
Reply
#20

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)
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)