SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/08/2017, 09:54 AM   #21
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,192
Reputation: 279
Default Re: Vehicle Missile Launcher

Update v1.8.0:

- Added Havoc Rocket (Circle ground missile)

- Ground Bomb (Standard bomb)

- Added functions:
PHP Code:
//Functions Havoc Rocket:
ToggleVehicleHavoc(vehicleid,toggle);
IsToggleVehicleHavoc(vehicleid);
Float:GetVehicleHavocSpeed(vehicleid);
SetVehicleHavocSpeed(vehicleid,Float:speed);
GetVehicleHavocReload(vehicleid);
SetVehicleHavocReload(vehicleid,time);
Float:GetVehicleHavocDistance(vehicleid);
SetVehicleHavocDistance(vehicleid,Float:distance);
GetVehicleHavocKey(vehicleid);
SetVehicleHavocKey(vehicleid,key);
Float:GetVehicleHavocSpread(vehicleid);
SetVehicleHavocSpread(vehicleid,Float:spread);
GetVehicleHavocSalvo(vehicleid);
SetVehicleHavocSalvo(vehicleid,salvo);

//Functions Ground Bomb:
ToggleVehicleGroundBomb(vehicleid,toggle);
IsToggleVehicleGroundBomb(vehicleid);
Float:GetVehicleGroundBombSpeed(vehicleid);
SetVehicleGroundBombSpeed(vehicleid,Float:speed);
GetVehicleGroundBombReload(vehicleid);
SetVehicleGroundBombReload(vehicleid,time);
Float:GetVehicleGroundBombDistance(vehicleid);
SetVehicleGroundBombDistance(vehicleid,Float:distance);
GetVehicleGroundBombKey(vehicleid);
SetVehicleGroundBombKey(vehicleid,key); 
- Added per player functions:
PHP Code:
GetMiniMissileRemainingTime(playerid);
GetHeavyMissileRemainingTime(playerid);
GetRhinoMissileRemainingTime(playerid);
GetBomberMissileRemainingTime(playerid);
GetMortarMissileRemainingTime(playerid);
GetMegaMissileRemainingTime(playerid);
GetCongreveRemainingTime(playerid);
GetHavocRemainingTime(playerid);
GetGroundBombRemainingTime(playerid); 
- Added functions:
PHP Code:
GetVehicleMiniMissileAmmo(vehicleid);
GetVehicleHeavyMissileAmmo(vehicleid);
GetVehicleRhinoMissileAmmo(vehicleid);
GetVehicleBomberMissileAmmo(vehicleid);
GetVehicleMortarMissileAmmo(vehicleid);
GetVehicleMegaMissileAmmo(vehicleid);
GetVehicleCongreveAmmo(vehicleid);
GetVehicleHavocAmmo(vehicleid);
GetVehicleGroundBombAmmo(vehicleid);

SetVehicleMiniMissileAmmo(vehicleid,ammo);
SetVehicleHeavyMissileAmmo(vehicleid,ammo);
SetVehicleRhinoMissileAmmo(vehicleid,ammo);
SetVehicleBomberMissileAmmo(vehicleid,ammo);
SetVehicleMortarMissileAmmo(vehicleid,ammo);
SetVehicleMegaMissileAmmo(vehicleid,ammo);
SetVehicleCongreveAmmo(vehicleid,ammo);
SetVehicleHavocAmmo(vehicleid,ammo);
SetVehicleGroundBombAmmo(vehicleid,ammo);

//The amount of ammunition has nothing to do with the number of missiles launched! 
- Added extended functions:
PHP Code:
GetMissileRemainingTime(playerid,type);
GetVehicleMissileAmmo(vehicleid,type);
SetVehicleMissileAmmo(vehicleid,type,ammo); 
- Added callbacks:
PHP Code:
OnVehicleMissileRequestLaunch(playerid,type,vehicleid);
//return 0 if you want to block the use of weapons
//called every player press missile key if weapon is enabled


OnVehicleMissileLaunched(playerid,type,vehicleid);
//called only if missile has been launched 
- Added Mortar / Mega marker aim system:
PHP Code:
IsVehicleMissileAimSysReady(playerid); //use in OnVehicleMissileRequestLaunch type VEHICLE_MISSILE_TYPE_MORTAR or VEHICLE_MISSILE_TYPE_MEGA
SetVehicleMissileAimTarget(playerid,Float:x=0.0,Float:y=0.0); //set 0.0,0.0 if you need reset marker target

GetVehicleMortarMissileAimSys(vehicleid);
SetVehicleMortarMissileAimSys(vehicleid,toggle);

GetVehicleMegaMissileAimSys(vehicleid);
SetVehicleMegaMissileAimSys(vehicleid,toggle);

//default is disabled, player need use Height and Distance control system
//if is enabled, player need set marker in map after using mortar
//if marker distance is higher than mortar distance, it will be reduced 
- Added auto calculate remote count for distance

- Added definition:
PHP Code:
VEHICLE_WEAPON_AMMO_INFINITY 
Remaining Time / Ammo detection:
PHP Code:
public OnVehicleMissileRequestLaunch(playerid,type,vehicleid){
    
    new 
c_time GetMissileRemainingTime(playerid,type);
    if(
c_time 0){
        new 
buffer[32];
        
format(buffer,sizeof(buffer),"Remaining Time~n~~w~%.2f second",c_time 1000.0);
        
GameTextForPlayer(playerid,buffer,2500,4);
    } else if(
GetVehicleMissileAmmo(vehicleid,type) == 0){
        new 
buffer[32];
        
format(buffer,sizeof(buffer),"No ammunition");
        
GameTextForPlayer(playerid,buffer,2500,4);
    }
    if((
type == VEHICLE_MISSILE_TYPE_MORTAR && GetVehicleMortarMissileAimSys(vehicleid)) || (type == VEHICLE_MISSILE_TYPE_MEGA && GetVehicleMegaMissileAimSys(vehicleid))){
        if(!
IsVehicleMissileAimSysReady(playerid)){
            
GameTextForPlayer(playerid,"Select target in map",2500,4);
        }
    }
    return 
1;
}

public 
OnVehicleMissileLaunched(playerid,type,vehicleid){
    new 
ammo GetVehicleMissileAmmo(vehicleid,type);
    if(
ammo != VEHICLE_WEAPON_AMMO_INFINITY){
        new 
buffer[32];
        
format(buffer,sizeof(buffer),"Vehicle Ammo~n~~w~%d",ammo);
        
GameTextForPlayer(playerid,buffer,2500,4);
    }
    return 
1;

Video:
https://www.youtube.com/watch?v=NDWkGCxCJuA
AbyssMorgan is online now   Reply With Quote
Old 21/08/2017, 04:14 PM   #22
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,192
Reputation: 279
Default Re: Vehicle Missile Launcher

Update v1.9.0:

- Added support for CreateDynamicExplosionDMG (now missile auto detect player death)

- Added support for damage NPC

- Added support for Streamer Tags

- Minor code optimizations

- Added functions:
PHP Code:
Float:GetVehicleMiniMissileDMG(vehicleid);
SetVehicleMiniMissileDMG(vehicleid,Float:damage);
Float:GetVehicleMiniMissileVehDMG(vehicleid);
SetVehicleMiniMissileVehDMG(vehicleid,Float:damage);

Float:GetVehicleHeavyMissileDMG(vehicleid);
SetVehicleHeavyMissileDMG(vehicleid,Float:damage);
Float:GetVehicleHeavyMissileVehDMG(vehicleid);
SetVehicleHeavyMissileVehDMG(vehicleid,Float:damage);

Float:GetVehicleBomberMissileDMG(vehicleid);
SetVehicleBomberMissileDMG(vehicleid,Float:damage);
Float:GetVehicleBomberMissileVehDMG(vehicleid);
SetVehicleBomberMissileVehDMG(vehicleid,Float:damage);

Float:GetVehicleRhinoMissileDMG(vehicleid);
SetVehicleRhinoMissileDMG(vehicleid,Float:damage);
Float:GetVehicleRhinoMissileVehDMG(vehicleid);
SetVehicleRhinoMissileVehDMG(vehicleid,Float:damage);

Float:GetVehicleMortarMissileDMG(vehicleid);
SetVehicleMortarMissileDMG(vehicleid,Float:damage);
Float:GetVehicleMortarMissileVehDMG(vehicleid);
SetVehicleMortarMissileVehDMG(vehicleid,Float:damage);

Float:GetVehicleMegaMissileDMG(vehicleid);
SetVehicleMegaMissileDMG(vehicleid,Float:damage);
Float:GetVehicleMegaMissileVehDMG(vehicleid);
SetVehicleMegaMissileVehDMG(vehicleid,Float:damage);

Float:GetVehicleCongreveDMG(vehicleid);
SetVehicleCongreveDMG(vehicleid,Float:damage);
Float:GetVehicleCongreveVehDMG(vehicleid);
SetVehicleCongreveVehDMG(vehicleid,Float:damage);

Float:GetVehicleHavocDMG(vehicleid);
SetVehicleHavocDMG(vehicleid,Float:damage);
Float:GetVehicleHavocVehDMG(vehicleid);
SetVehicleHavocVehDMG(vehicleid,Float:damage);

Float:GetVehicleGroundBombDMG(vehicleid);
SetVehicleGroundBombDMG(vehicleid,Float:damage);
Float:GetVehicleGroundBombVehDMG(vehicleid);
SetVehicleGroundBombVehDMG(vehicleid,Float:damage); 
AbyssMorgan is online now   Reply With Quote
Old 11/09/2017, 05:46 PM   #23
vegaltasendai
Big Clucker
 
Join Date: Mar 2014
Posts: 115
Reputation: 23
Default Re: Vehicle Missile Launcher

I have the correct version and I get this error

Code:
pawno\include\VehicleMissileCol.inc(250) : fatal error 111: user error: [ADM] You need ColAndreas v1.4.0 (github.com/Pottus/ColAndreas/releases)
vegaltasendai is offline   Reply With Quote
Old 11/09/2017, 06:01 PM   #24
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,192
Reputation: 279
Default Re: Vehicle Missile Launcher

Quote:
Originally Posted by vegaltasendai View Post
I have the correct version and I get this error

Code:
pawno\include\VehicleMissileCol.inc(250) : fatal error 111: user error: [ADM] You need ColAndreas v1.4.0 (github.com/Pottus/ColAndreas/releases)
Download correct colandreas.inc
https://github.com/Pottus/ColAndreas...colandreas.inc
AbyssMorgan is online now   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
A51 Missile Kwarde Screenshots and Videos 9 27/06/2011 08:00 PM
"Slight homing", make a missile "Slightly!" home a vehicle. Donya Help Archive 4 11/06/2011 09:20 PM
What is the pickup id of a Rocket luncher??? Exterminator Help Archive 5 02/11/2010 06:59 PM


All times are GMT. The time now is 07:19 PM.


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