[Include] EngineX (Aircrafts manipulation)
#1

Hello, I would like to present EngineX.
This mechanism was created to manipulate objects automatically planes.

Video:
EngineX v6.0 (ColAndreas Precision)
EngineX v5.0 (Full Presentation) Presentation starts at 03:10

Mechanism contains the following instructions manipulate objects:
Код:
ENGINE_NORMAL 		//[Object: 1681, 18846 OR ANY] 		|| 6.0 X
ENGINE_FIGHTER		//[Object: 10757]			|| 6.0 X
ENGINE_SUPPLY		//[Object: 1683, 3528]			|| 6.0 X
ENGINE_NGCMS		//[N/A] (Only NGCM)			|| 4.0 X
ENGINE_ARCMS		//[N/A] (Only NGCM)			|| 4.0 X
ENGINE_COMMANDER	//[N/A] (Only NGCM)			|| 4.0 X
ENGINE_ELITE		//[Object: 14553] 			|| 6.0 X
ENGINE_UBOOT		//[Object: 9958]			|| 6.0 X
ENGINE_SHIP		//[Object: 8493]			|| 6.0 CA
ENGINE_MINI		//[Object: 2510, 2512]			|| 6.0 X
ENGINE_EXCAVATOR	//[Object: 18248]			|| 4.1 G (Ground)
ENGINE_UNDERDUDE	//[Object: 1379]			|| 6.0 U (Underwater)
Delta/Epsilon Engine Rotation Speed:
Код:
DELTA_ENGINE_SPEED_NORMAL 		(0.050)
DELTA_ENGINE_SPEED_FIGHTER		(0.050)
DELTA_ENGINE_SPEED_SUPPLY		(0.020)
DELTA_ENGINE_SPEED_NGCMS		(0.050)
DELTA_ENGINE_SPEED_ARCMS		(0.050)
DELTA_ENGINE_SPEED_COMMANDER		(0.050)
DELTA_ENGINE_SPEED_ELITE		(0.010)
DELTA_ENGINE_SPEED_UBOOT		(0.005)
DELTA_ENGINE_SPEED_SHIP			(0.050)
DELTA_ENGINE_SPEED_MINI			(0.050)
DELTA_ENGINE_SPEED_EXCAVATOR		(0.001)
DELTA_ENGINE_SPEED_UNDERDUDE		(0.050)
Functions v4.0 and v5.0:
PHP код:
//Function execution for Engine 4.0 during 0.5 seconds
EngineX(objectid,areaid,engineid,minradius,maxradius,Float:minz,Float:speed);
//Function execution for Engine 5.0 X during 0.5 seconds
//Performing for the change when the object does not move
//step 1
DeltaEngineRotation(objectid,engineid,Float:speed 0.05);
//step 2
DeltaEngineX(objectid,areaid,engineid,minradius,maxradius,Float:minz,Float:speed); 
Example:
PHP код:
//every 0.5 seconds
public DefenseHulkUpdate(mobid){
    if(
DefenseHulkStatus[mobid] == (1)){
        
EngineX(DefenseHulk[mobid][22],DefenseHulk[mobid][0],ENGINE_NORMAL,50,200,25,MOB_SPEED_SLOW);
    }
    return 
1;
}
//every 0.5 seconds
public FighterUpdate(mobid){
    if(
NGCFighter[mobid][2] == 1){
        if(!
IsDynamicObjectMoving(NGCFighter[mobid][0])){
            if(
NGCFighter[mobid][3] == 0){
                
DeltaEngineRotation(NGCFighter[mobid][0],ENGINE_FIGHTER);
                
NGCFighter[mobid][3] = 1;
            } else {
                
DeltaEngineX(NGCFighter[mobid][0],NGCFighter[mobid][1],ENGINE_FIGHTER,50,100,5,MOB_SPEED_NORMAL);
                
NGCFighter[mobid][3] = 0;
            }
        }
    }
    return 
1;
}
//every 0.5 seconds
public ExcavatorUpdate(mobid){
    if(
NGCExcavator[mobid][2] == 1){
        
EngineX(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,50,100,1.0,MOB_SPEED_SLOW);
        
EngineExcavatorUpdate(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,MOB_SPEED_SLOW);        
    }
    return 
1;

Functions v6.0:
PHP код:
//Function execution for Engine 6.0 CA during 0.5 seconds
EngineXCA(objectid,areaid,EngineX:engineid,minradius,maxradius,Float:minz,Float:speed,Float:cut_size=5.0);
//Function execution for Engine 6.0 X during 0.5 seconds
//Performing for the change when the object does not move
//step 1
EpsilonEngineRotation(objectid,engineid,Float:speed 0.05);
//step 2
EpsilonEngineX(objectid,areaid,engineid,minradius,maxradius,Float:minz,Float:speed,Float:cut_size=5.0); 
Example:
PHP код:
//every 0.5 seconds
public DefenseHulkUpdate(mobid){
    if(
DefenseHulkStatus[mobid] == (1)){
        
EngineXCA(DefenseHulk[mobid][22],DefenseHulk[mobid][0],ENGINE_NORMAL,50,200,25,MOB_SPEED_SLOW);
    }
    return 
1;
}
//every 0.5 seconds
public FighterUpdate(mobid){
    if(
NGCFighter[mobid][2] == 1){
        if(!
IsDynamicObjectMoving(NGCFighter[mobid][0])){
            if(
NGCFighter[mobid][3] == 0){
                
EpsilonEngineRotation(NGCFighter[mobid][0],ENGINE_FIGHTER);
                
NGCFighter[mobid][3] = 1;
            } else {
                
EpsilonEngineX(NGCFighter[mobid][0],NGCFighter[mobid][1],ENGINE_FIGHTER,50,100,5,MOB_SPEED_NORMAL);
                
NGCFighter[mobid][3] = 0;
            }
        }
    }
    return 
1;
}
//every 0.5 seconds
public ExcavatorUpdate(mobid){
    if(
NGCExcavator[mobid][2] == 1){
        
EngineXCA(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,50,100,1.0,MOB_SPEED_SLOW);
        
EngineExcavatorUpdate(NGCExcavator[mobid][0],NGCExcavator[mobid][1],ENGINE_EXCAVATOR,MOB_SPEED_SLOW);        
    }
    return 
1;

Here a sample script for Reaver Defense Hulk and 2 types of aircraft:
DefenseHulk.pwn
DefenseHulkV6.pwn

Download Include:
3DTryg.inc Thread
EngineV6.inc
EngineX.inc
ColAndreas (EngineV6)

YSF - kurta999's version:
https://sampforum.blast.hk/showthread.php?tid=513499

Notice:
Posts can be made available in a other language forums, please remember to keep the author and permanent link to file on github and a link to post in forum samp.
Reply


Messages In This Thread
EngineX (Aircrafts manipulation) - by AbyssMorgan - 10.02.2016, 15:51
Re: EngineX (Aircrafts manipulation) - by SecretBoss - 10.02.2016, 16:08
Re: EngineX (Aircrafts manipulation) - by Ritzy2K - 10.02.2016, 16:42
Re: EngineX (Aircrafts manipulation) - by Pottus - 10.02.2016, 17:07
Re: EngineX (Aircrafts manipulation) - by AbyssMorgan - 10.02.2016, 17:23
Re: EngineX (Aircrafts manipulation) - by Kar - 10.02.2016, 18:36
Re: EngineX (Aircrafts manipulation) - by AbyssMorgan - 10.02.2016, 18:38
Re: EngineX (Aircrafts manipulation) - by Amunra - 11.02.2016, 09:21
Re: EngineX (Aircrafts manipulation) - by TakeiT - 14.02.2016, 01:42
Re: EngineX (Aircrafts manipulation) - by Joron - 16.02.2016, 21:07
Re: EngineX (Aircrafts manipulation) - by AbyssMorgan - 17.02.2016, 07:46
Re: EngineX (Aircrafts manipulation) - by AbyssMorgan - 06.07.2016, 18:10
Re: EngineX (Aircrafts manipulation) - by AbyssMorgan - 09.07.2016, 08:05
Re: EngineX (Aircrafts manipulation) - by SyS - 09.07.2016, 10:22

Forum Jump:


Users browsing this thread: 3 Guest(s)