SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 03/12/2010, 06:46 PM   #1
Hiddos
High-roller
 
Hiddos's Avatar
 
Join Date: Sep 2008
Posts: 3,880
Reputation: 1736
Default Airstrike system - Based on Modern Warfare 2

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 Code:
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!

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 Code:
//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 Code:
#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 Code:
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.
__________________
hiddos ♥ duck 07/08/2013
Quote:
Originally Posted by EdwardJackson View Post
HOOOOOEEEEEEEEEEEEEEEE I DONT DO THAT I HAVE EARNED MY REPUTAIONS FUCKHEAD HOE ASS STRIPPER
Don't send me any more friend invites please, I tend to get IP banned for accepting them

Last edited by Hiddos; 03/12/2010 at 07:17 PM.
Hiddos is offline   Reply With Quote
Old 03/12/2010, 06:50 PM   #2
Meinstad
Gangsta
 
Meinstad's Avatar
 
Join Date: Sep 2010
Location: Northpole
Posts: 649
Reputation: 31
Default Re: Airstrike system - Based on Modern Warfare 2

Sweet, I'll test it out!
__________________
Meinstad is offline   Reply With Quote
Old 03/12/2010, 06:52 PM   #3
WillyP
High-roller
 
WillyP's Avatar
 
Join Date: Jul 2010
Location: Durham, England
Posts: 2,232
Reputation: 63
Default Re: Airstrike system - Based on Modern Warfare 2

Sexy Hiddy!
WillyP is offline   Reply With Quote
Old 03/12/2010, 06:59 PM   #4
Hiddos
High-roller
 
Hiddos's Avatar
 
Join Date: Sep 2008
Posts: 3,880
Reputation: 1736
Default Re: Airstrike system - Based on Modern Warfare 2

Thanks, added an example usage and a notice to use Airstrike_Init() before using.
__________________
hiddos ♥ duck 07/08/2013
Quote:
Originally Posted by EdwardJackson View Post
HOOOOOEEEEEEEEEEEEEEEE I DONT DO THAT I HAVE EARNED MY REPUTAIONS FUCKHEAD HOE ASS STRIPPER
Don't send me any more friend invites please, I tend to get IP banned for accepting them
Hiddos is offline   Reply With Quote
Old 03/12/2010, 07:02 PM   #5
The_Moddler
High-roller
 
The_Moddler's Avatar
 
Join Date: Jan 2010
Location: In my house.
Posts: 1,168
Reputation: 3
Default Re: Airstrike system - Based on Modern Warfare 2

Nice man!
__________________
The_Moddler is offline   Reply With Quote
Old 03/12/2010, 07:18 PM   #6
Hiddos
High-roller
 
Hiddos's Avatar
 
Join Date: Sep 2008
Posts: 3,880
Reputation: 1736
Default Re: Airstrike system - Based on Modern Warfare 2

Quote:
Originally Posted by The_Moddler View Post
Nice man!
Thanks. I just found a wrong comment mark ("/" instead of "/*") in the include. Fixed, correct versions have been uploaded.
__________________
hiddos ♥ duck 07/08/2013
Quote:
Originally Posted by EdwardJackson View Post
HOOOOOEEEEEEEEEEEEEEEE I DONT DO THAT I HAVE EARNED MY REPUTAIONS FUCKHEAD HOE ASS STRIPPER
Don't send me any more friend invites please, I tend to get IP banned for accepting them
Hiddos is offline   Reply With Quote
Old 03/12/2010, 08:19 PM   #7
Dany23
Big Clucker
 
Join Date: Oct 2010
Posts: 64
Reputation: 1
Default Re: Airstrike system - Based on Modern Warfare 2

hmmm nice 9/10
__________________
www.b-zone.ro
Dany23 is offline   Reply With Quote
Old 03/12/2010, 09:25 PM   #8
Dime
Huge Clucker
 
Join Date: Jul 2010
Posts: 277
Reputation: 1
Default Re: Airstrike system - Based on Modern Warfare 2

Cool voted too
Dime is offline   Reply With Quote
Old 03/12/2010, 09:40 PM   #9
TheDeadLY
Little Clucker
 
TheDeadLY's Avatar
 
Join Date: Nov 2010
Posts: 4
Reputation: 0
Default Re: Airstrike system - Based on Modern Warfare 2

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
__________________
TheDeadLY is offline   Reply With Quote
Old 03/12/2010, 09:53 PM   #10
Kitten
High-roller
 
Kitten's Avatar
 
Join Date: Jul 2010
Location: Canada
Posts: 2,314
Reputation: 236
Default Re: Airstrike system - Based on Modern Warfare 2

Very nice try making a ac130 if u can ur freakin c00l
__________________
Kitten is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] [GM] - A/D Modern Warfare 1.0 T1CKLE Gamemode Scripts 38 01/12/2011 01:56 PM
Modern Warfare 2 ShOckeR22 Screenshots and Videos 7 28/02/2010 04:51 PM
COD 6 Modern Warfare 2 weedarr Everything and Nothing 15 08/01/2009 11:30 PM


All times are GMT. The time now is 12:28 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.