help plz
#1

how to get, when the player launches a missile(Hydra)

my english is not very good
Reply
#2

Check if the player is in a vehicle with the hydra modиle and when he fire during his fly with OnPlayerKeyStateChange(playerid, newkeys, oldkeys).
(My english isn't better. xD )
Reply
#3

the only way is, adding checks in OnPlayerKeyStateChange like that:

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
veh;
    if( ( 
veh GetPlayerVehicleID(playerid) ) )
    {
        if( 
GetVehicleModel(veh) == 520 )
        {
                if( ( ( ( 
newkeys & ( KEY_FIRE) ) == ( KEY_FIRE ) && ( ( oldkeys & ( KEY_FIRE ) ) != ( KEY_FIRE ) ) ) ) )
                {
                    
// player fired a missle with a hydra. NOT ACCURATE, NOT TESTED.
                
}
        }
    }
    return 
true;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)