disable parachute
#9

When a player presses f/enter key to exit the vehicle, it checks if the vehicle is an aircraft. If it is, it stores the weapons and the ammo to an array, it resets the weapons and it gives them back except weaponid 46 which is parachute.
pawn Код:
public OnPlayerExitVehicle( playerid, vehicleid )
{
    if( IsVehicleAircraft( vehicleid ) )
    {
        new
            weapons[ 13 ][ 2 ]
        ;
        for( new i = 0; i < 13; i++ ) GetPlayerWeaponData( playerid, i, weapons[ i ][ 0 ], weapons[ i ][ 1 ] );
        ResetPlayerWeapons( playerid );
        for( new i = 0; i < 13; i++ ) if( weapons[ i ][ 0 ] != 46 ) GivePlayerWeapon( playerid, weapons[ i ][ 0 ], weapons[ i ][ 1 ] );
    }
}

stock IsVehicleAircraft( vehicleid )
{
    new
        model = GetVehicleModel( vehicleid )
    ;
    switch( model )
    {
        case 417, 428, 447, 460, 469, 476, 487, 488, 497, 511 .. 513, 519, 520, 548, 553, 563, 577, 592, 593: return 1;
    }
    return 0;
}
Reply


Messages In This Thread
disable parachute - by SampzzonE - 02.09.2013, 16:25
Re : disable parachute - by 1Geek - 02.09.2013, 16:34
Re: disable parachute - by SampzzonE - 02.09.2013, 16:37
Re : disable parachute - by Matnix - 02.09.2013, 16:38
Re: disable parachute - by Tomer!.$ - 02.09.2013, 16:46
Re : disable parachute - by 1Geek - 02.09.2013, 16:46
Re : disable parachute - by 1Geek - 02.09.2013, 16:58
Re : disable parachute - by 1Geek - 02.09.2013, 17:08
Re: disable parachute - by Konstantinos - 02.09.2013, 17:14
Re: disable parachute - by SampzzonE - 03.09.2013, 12:53

Forum Jump:


Users browsing this thread: 1 Guest(s)