19.08.2017, 09:54
Update v1.8.0:
- Added Havoc Rocket (Circle ground missile)
- Ground Bomb (Standard bomb)
- Added functions:
- Added per player functions:
- Added functions:
- Added extended functions:
- Added callbacks:
- Added Mortar / Mega marker aim system:
- Added auto calculate remote count for distance
- Added definition:
Remaining Time / Ammo detection:
Video:
https://www.youtube.com/watch?v=NDWkGCxCJuA
- 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);
PHP код:
GetMiniMissileRemainingTime(playerid);
GetHeavyMissileRemainingTime(playerid);
GetRhinoMissileRemainingTime(playerid);
GetBomberMissileRemainingTime(playerid);
GetMortarMissileRemainingTime(playerid);
GetMegaMissileRemainingTime(playerid);
GetCongreveRemainingTime(playerid);
GetHavocRemainingTime(playerid);
GetGroundBombRemainingTime(playerid);
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!
PHP код:
GetMissileRemainingTime(playerid,type);
GetVehicleMissileAmmo(vehicleid,type);
SetVehicleMissileAmmo(vehicleid,type,ammo);
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
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 definition:
PHP код:
VEHICLE_WEAPON_AMMO_INFINITY
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;
}
https://www.youtube.com/watch?v=NDWkGCxCJuA