SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 28/03/2017, 11:08 AM   #21
MehranGta
Big Clucker
 
Join Date: Jul 2012
Location: CA - IR
Posts: 192
Reputation: -7
Default Re: Missile Launcher

Can you provide example code of MissileLaunchAimPlayer ?
MehranGta is offline   Reply With Quote
Old 28/03/2017, 02:36 PM   #22
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

PHP Code:
CMD:shot(playerid,params[]){
    
    new 
targetidFloat:xFloat:yFloat:z;
    if(
sscanf(params,"d",targetid)) return SendClientMessage(playerid,-1,"Use /shot <playerid>");
    
    
GetPlayerPos(playerid,x,y,z);
    
MissileLaunchAimPlayer(targetid,MISSILE_TYPE_EXPLODE_LARGE,5.0,25.0,100.0,x,y,z,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid),-1,200.0,MISSILE_OBJECT_HYDRA,x,y,z+100.0,playerid);
    return 
1;

AbyssMorgan is offline   Reply With Quote
Old 28/03/2017, 04:24 PM   #23
MehranGta
Big Clucker
 
Join Date: Jul 2012
Location: CA - IR
Posts: 192
Reputation: -7
Default Re: Missile Launcher

I dont understand tx ty tz when there is a targetid
MehranGta is offline   Reply With Quote
Old 28/03/2017, 04:31 PM   #24
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

x,y,z - start position
tx,ty,tz - first target position
After missile moving to tx,ty,tz moving to targetid.

In my example the missile flies first up 100 meters and then flies to the target.

AbyssMorgan is offline   Reply With Quote
Old 29/03/2017, 04:54 PM   #25
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

Update v1.9.0:

- Auto disable all player missiles aim after player death.

- Added function:
PHP Code:
DisableAllPlayerMissileAim(playerid); 
- Added new missile_object:
PHP Code:
MISSILE_OBJECT_BOMB
MISSILE_OBJECT_BOMB_STATIC 
rotation rx always is 0.0 
AbyssMorgan is offline   Reply With Quote
Old 15/04/2017, 02:10 PM   #26
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

Update v2.0.0:

- Update Arc System for Real Ellipse Arc.

- Updated function:
Code:
MissileLaunch(type,Float:detection_range,Float:explode_radius,Float:speed,Float:x,Float:y,Float:z,worldid,interiorid,playerid,
Float:streamdistance,missile_object,Float:tx,Float:ty,Float:tz,byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,
bool:remote=false,remote_count=MAX_MISSILE_REMOTE_TARGET,remote_height=1.0,Float:arc_roll=0.0);
AbyssMorgan is offline   Reply With Quote
Old 19/08/2017, 10:50 AM   #27
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

Update v2.1.0:

- Added callback:
PHP Code:
OnMissileRequestLaunch(Float:x,Float:y,Float:z,playerid,targetid); 
- Fixed Static Bomb (MISSILE_OBJECT_BOMB_STATIC)
AbyssMorgan is offline   Reply With Quote
Old 21/08/2017, 05:09 PM   #28
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

Update v2.2.0:

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

- Added support for damage NPC

- Added support for Streamer Tags

- Updated functions:
Code:
MissileLaunch(type,Float:detection_range,Float:explode_radius,Float:speed,Float:x,Float:y,Float:z,worldid,interiorid,playerid,
Float:streamdistance,missile_object,Float:tx,Float:ty,Float:tz,byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,
bool:remote=false,remote_count=MAX_MISSILE_REMOTE_TARGET,remote_height=1.0,Float:arc_roll=0.0,
Float:damage=-1.0,Float:vehicle_damage=-1.0);

MissileLaunchAimPlayer(targetid,type,Float:detection_range,Float:explode_radius,Float:speed,Float:x,Float:y,Float:z,
worldid,interiorid,playerid,Float:streamdistance,missile_object,Float:tx,Float:ty,Float:tz,
byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,Float:damage=-1.0,Float:vehicle_damage=-1.0);

//if damage is -1 mine generated standard DynamicExplosion without DMG system
//if vehicle damage is -1 and damage is not -1, vehicle damage now is 750
AbyssMorgan is offline   Reply With Quote
Old 10/10/2019, 02:57 PM   #29
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

Update v2.3.0:

- Renamed functions:
PHP Code:
MissileLaunch -> Missile::Launch
MissileLaunchAimPlayer 
-> Missile::LaunchAimPlayer
MissileStopAimPlayer 
-> Missile::StopAimPlayer
MissileDestroy 
-> Missile::Destroy
MissileRemoteTarget 
-> Missile::RemoteTarget
GetMissileExplodeVisibility 
-> Missile::GetExplodeVisibility
SetMissileExplodeVisibility 
-> Missile::SetExplodeVisibility
DisableAllPlayerMissileAim 
-> Missile::DisableAllAim 
- Added missile missile_object: MISSILE_OBJECT_FLARE_1, MISSILE_OBJECT_FLARE_2, MISSILE_OBJECT_BULLET

- Added definition MISSILE_TYPE_EXPLODE_NONE

If you using MISSILE_OBJECT_BULLET with MISSILE_TYPE_EXPLODE_NONE and custom damage, you got bullet without any explosion but player's/vehicle's take damage

Bullet example:
PHP Code:
Missile::Launch(MISSILE_TYPE_EXPLODE_NONE,1.0,1.0,20.0,Float:x,Float:y,Float:z,worldid,interiorid,playerid,Float:streamdistance,MISSILE_OBJECT_BULLET,Float:tx,Float:ty,Float:tz,byplayerid=INVALID_PLAYER_ID,teamid=ANY_TEAM,.damage=5.0,.vehicle_damage=25.0); 
Video Flares:
https://www.youtube.com/watch?v=qQ1T2NszDkc
AbyssMorgan is offline   Reply With Quote
Old 01/11/2019, 08:56 AM   #30
AbyssMorgan
Banned
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 352
Default Re: Missile Launcher

Update v2.3.1:

- Fixed Collisions

- Added support for NO_TEAM

- Added ColAndreas as required lib
AbyssMorgan is offline   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
Missile Object PCheriyan007 Help Archive 4 31/05/2011 04:49 PM


All times are GMT. The time now is 04:49 AM.


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