30.07.2016, 18:10
Update VehicleMissileCol.inc v1.5.4:
- Added new Vehicle Weapon Mega Missile (Heavy Marica mortar)
Video: https://www.youtube.com/watch?v=0FlZwi34wIA
- Added functions for Mega Missile:
- Added extended functions:
- Added Callback:
- Added Definitions:
Example Code:
- Added new Vehicle Weapon Mega Missile (Heavy Marica mortar)
Video: https://www.youtube.com/watch?v=0FlZwi34wIA
- Added functions for Mega Missile:
PHP Code:
ToggleVehicleMegaMissile(vehicleid,toggle);
IsToggleVehicleMegaMissile(vehicleid);
Float:GetVehicleMegaMissileSpeed(vehicleid);
SetVehicleMegaMissileSpeed(vehicleid,Float:speed);
GetVehicleMegaMissileReload(vehicleid);
SetVehicleMegaMissileReload(vehicleid,time);
Float:GetVehicleMegaMissileDistance(vehicleid);
SetVehicleMegaMissileDistance(vehicleid,Float:distance);
GetVehicleMegaMissileKey(vehicleid);
SetVehicleMegaMissileKey(vehicleid,key);
Float:GetVehicleMegaMissileHeight(vehicleid);
SetVehicleMegaMissileHeight(vehicleid,Float:height);
PHP Code:
SetVehicleMissileDefaultConfig(vehicleid);
ToggleMissileAutoDisarm(bool:toggle);
bool:IsToggleMissileAutoDisarm();
PHP Code:
OnVehicleArmed(playerid,vehicleid); //use to arm the vehicle at the right time (recommended to use ToggleMissileAutoDisarm(true);)
PHP Code:
VEHICLE_MISSILE_TYPE_MEGA
VEHICLE_MISSILE_SPEED_MEGA // default combat speed for Mega Missile
VEHICLE_MISSILE_RELOAD_MEGA // default reload time in milisecond for Mega Missile
VEHICLE_MISSILE_DISTANCE_MEGA // default maximum distance that can be overcome rocket
VEHICLE_MISSILE_KEY_MEGA // default key (KEY_YES)
VEHICLE_MISSILE_HEIGHT_MEGA // default arc height for Mega Missile
PHP Code:
public OnGameModeInit(){
ToggleMissileAutoDisarm(true);
return 1;
}
public OnVehicleArmed(playerid,vehicleid){
switch(GetVehicleModel(vehicleid)){
case 564: { //rc tiger
ToggleVehicleRhinoMissile(vehicleid,1);
}
case 553: { //nevada
ToggleVehicleBomberMissile(vehicleid,1);
}
case 592: { //andromada
ToggleVehicleBomberMissile(vehicleid,1);
SetVehicleBomberMissileSpeed(vehicleid,60.0);
SetVehicleBomberMissileReload(vehicleid,500);
}
case 520: { //hydra
ToggleVehicleBomberMissile(vehicleid,1);
SetVehicleBomberMissileSpeed(vehicleid,80.0);
SetVehicleBomberMissileReload(vehicleid,500);
ToggleVehicleHeavyMissile(vehicleid,1);
SetVehicleHeavyMissileSpeed(vehicleid,90.0);
SetVehicleHeavyMissileKey(vehicleid,KEY_CROUCH);
}
case 476: { //rustler
ToggleVehicleMiniMissile(vehicleid,1);
SetVehicleMiniMissileSpeed(vehicleid,80.0);
ToggleVehicleBomberMissile(vehicleid,1);
SetVehicleBomberMissileSpeed(vehicleid,80.0);
SetVehicleBomberMissileReload(vehicleid,500);
}
case 548, 497, 469: { //Cargobob, Police Maverik, Sparrow
ToggleVehicleMiniMissile(vehicleid,1);
ToggleVehicleBomberMissile(vehicleid,1);
}
case 512: { //Cropduster
ToggleVehicleBomberMissile(vehicleid,1);
}
case 513: { //stuntplane
ToggleVehicleBomberMissile(vehicleid,1);
}
case 519: { //shamal
ToggleVehicleMiniMissile(vehicleid,1);
SetVehicleMiniMissileSpeed(vehicleid,80.0);
}
case 432: { //rhino
ToggleVehicleMegaMissile(vehicleid,1);
SetVehicleMegaMissileSpeed(vehicleid,50.0);
SetVehicleMegaMissileHeight(vehicleid,VEHICLE_MISSILE_HEIGHT_MEGA);
SetVehicleMegaMissileDistance(vehicleid,VEHICLE_MISSILE_DISTANCE_MEGA);
}
}
return 1;
}