[FilterScript] Air Bomb
#1

Hello guys, i did a filterscript and i found very interesting because i used a plugin MapAndreas what he does is very simple, it takes the Z coordinate dynamically using a map with high levels, you should download it HERE.

Code:

pawn Код:
/*
 _____   _   _____      _____   _____   ___   ___   _____
|  _  | | | |  _  |    |  _  | |  _  | |   | |   | |  _  |
| |_| | | | | |_| |    | |_| | | | | | |   |_|   | | |_| |
|  _  | | | |  _  \    |  _  \ | | | | |  _   _  | |  _  \
| | | | | | | | | |    | |_| | | |_| | | | | | | | | |_| |
|_| |_| |_| |_| |_|    |_____| |_____| |_| |_| |_| |_____|

..-=====-...-=====-...-=====-...-=====-...-=====-...-=====-..

All Rights Reserved, let the credits in the appropriate places, does not need to put in commands
Just leave the main() or OnFilterScriptInit...

Warning: This plugin uses the filterscript MapAndreas, you need to download it.

AProject Author: BlueX, thanks: Kalcor & Mauzen by MapAndreas

*/

#define FILTERSCRIPT

#define FS_V "v1"
#define FS_C "BlueX"
#define FS_D "18/4/2012"
#define FS_SOLTS (500) //Info: Edit the slots of your server.
#define FS_AMMO (25) //Info: Edit the maximum for each aircraft missiles

#include <a_samp>
#include <mapandreas>
#include <zcmd>

#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

new bomb[FS_SOLTS];
new ammo[MAX_VEHICLES] = FS_AMMO;
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    printf(" AIR BOMB %s",FS_V);
    printf(" CREDITOS: %s",FS_C);
    printf(" SOLTS: %d",FS_SOLTS);
    printf(" Release: %s",FS_D);
    print("--------------------------------------\n");
    MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_FIRE)){
        cmd_fire(playerid);
    }
    return 1;
}
CMD:fire(playerid){
    if(IsPlayerInAnyVehicle(playerid)){
            new Float:X,Float:Y,Float:Z,Float:A, car = GetPlayerVehicleID(playerid),model = GetVehicleModel(car);
        if(ammo[car] == 0) return SendClientMessage(playerid,-1,"sem muniзгo, use /ammo");
        if(model != 553) return 1;
        GetPlayerPos(playerid,X,Y,Z);
        GetVehicleZAngle(GetPlayerVehicleID(playerid),A);
        bomb[playerid] = CreateObject(345,X,Y,Z,A,0,0,0.0);
       
        MapAndreas_FindZ_For2DCoord(X,Y,Z);
        MoveObject(bomb[playerid],X,Y,Z,100.0,A,0.0,0.0);
        CreateExplosion(X,Y,Z,10,20.0);
        ammo[car] --;
        DestroyObject(bomb[playerid]);
    }
    return 1;
}
//Info: Command used to drop bombs, you can use the ALT key and can use the command /fire

CMD:ammo(playerid){
    new car = GetPlayerVehicleID(playerid);
    //if(IsPlayerInRangeOfPoint(playerid,10.0,X,Y,Z)){ ammo[car] = FS_AMMO };
    ammo[car] = 25;
    return 1;
}

//Info: You can put the command /ammo to work in a particular area just change the X, Y and Z
    //Remember that if you want to use IsPlayerInRangeOfPoint will have to eliminate the ammo[car]


/*CMD:nevada(playerid){
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    CreateVehicle(553,X,Y,Z+1,0,1,2,10000);
    return 1;
}*/


//Info: This command is used to create a nevada which is the vehicle that throws bombs ...
Description: What the FilterScript does is to send bombs, you press the ALT key and it goes dropping bombs, when you do not more bombs you must load it using /ammo, this FilterScript is very useful for servers of war.

ChangeLog:
  • v1 - Version released
Warnings:
  • This FilterScript was made in version 0.3eRC6, but I think that works in version 0.3d
  • Not recorded video because I was busy at the moment, but I took a photo just click HERE
  • Keep the credits in the content of the script does not cost anything, does not need to put in commands, just be in the code.
  • Sorry for my english and i hope you enjoyed.
Credits:
  • ~BlueX
    • Author of the Project
  • ~Kalcor
    • Creator of MapAndreas
  • ~Mauzen
    • Creator of MapAndreas v1.1
Reply
#2

shit! Brinks...
Reply
#3

Nice.
Reply
#4

awesome one ima use it in my server
Reply
#5

i Love ScreenshotS!.
Reply
#6

Man I made a similar one good job. But I think mine is more atractive coz it has screenshots and other more informations. I explained it a lot check mine and try making your one also attractive like mine.
[FilterScript] Bomber Plane
Reply
#7

epic
can you post a video? or pics?
Reply
#8

Quote:
Originally Posted by paulor
Посмотреть сообщение
shit! Brinks...
D: ahahaha

Quote:
Originally Posted by Đeagle
Посмотреть сообщение
Nice.
Thanks

Quote:
Originally Posted by [bot]fatninja
Посмотреть сообщение
awesome one ima use it in my server
Yeah thanks dude

Quote:
Originally Posted by Soi_salva
Посмотреть сообщение
i Love ScreenshotS!.
thanks bro'

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
Man I made a similar one good job. But I think mine is more atractive coz it has screenshots and other more informations. I explained it a lot check mine and try making your one also attractive like mine.
[FilterScript] Bomber Plane
Yes, I saw your topic, I'm gonna make a new version with new things

Quote:
Originally Posted by Moh_
Посмотреть сообщение
epic
can you post a video? or pics?
Yeah, i can post a video
Reply
#9

Nice BlueX
Reply
#10

when my bombs kill somone did i get the kills ?

i dont see onplayerdeath here
Reply
#11

que lgl !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)