[FilterScript] Vehicle Missile Launcher
#21

Update v1.8.0:

- Added Havoc Rocket (Circle ground missile)

- Ground Bomb (Standard bomb)

- Added functions:
PHP код:
//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 код:
GetMiniMissileRemainingTime(playerid);
GetHeavyMissileRemainingTime(playerid);
GetRhinoMissileRemainingTime(playerid);
GetBomberMissileRemainingTime(playerid);
GetMortarMissileRemainingTime(playerid);
GetMegaMissileRemainingTime(playerid);
GetCongreveRemainingTime(playerid);
GetHavocRemainingTime(playerid);
GetGroundBombRemainingTime(playerid); 
- Added functions:
PHP код:
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 код:
GetMissileRemainingTime(playerid,type);
GetVehicleMissileAmmo(vehicleid,type);
SetVehicleMissileAmmo(vehicleid,type,ammo); 
- Added callbacks:
PHP код:
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 код:
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 код:
VEHICLE_WEAPON_AMMO_INFINITY 
Remaining Time / Ammo detection:
PHP код:
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
Reply
#22

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 код:
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); 
Reply
#23

I have the correct version and I get this error

Код:
pawno\include\VehicleMissileCol.inc(250) : fatal error 111: user error: [ADM] You need ColAndreas v1.4.0 (github.com/Pottus/ColAndreas/releases)
Reply
#24

Quote:
Originally Posted by vegaltasendai
Посмотреть сообщение
I have the correct version and I get this error

Код:
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)