/*
_____ _ _____ _____ _____ ___ ___ _____
| _ | | | | _ | | _ | | _ | | | | | | _ |
| |_| | | | | |_| | | |_| | | | | | | |_| | | |_| |
| _ | | | | _ \ | _ \ | | | | | _ _ | | _ \
| | | | | | | | | | | |_| | | |_| | | | | | | | | |_| |
|_| |_| |_| |_| |_| |_____| |_____| |_| |_| |_| |_____|
..-=====-...-=====-...-=====-...-=====-...-=====-...-=====-..
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 ...
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 |