[DUDA]їCуmo agregar este sistema al GM de Zenon City?
#1

Bueno, pues miren, buscando en foros de samp alemanes encontrй un tipo que habнa liberado este FS:

Код:
#include a_samp
#include mapandreas
#undef MAX_PLAYERS
#define MAX_PLAYERS 100 // Serverslots beachten!
#define MAX_CHOPPERS 5
#define AMMO 50
#define SHOOT "/fire"
enum pInfo{
        chopper,
        bool:HasChopper,
        ChopperID,
        chpTime,
        bool:change,
        timer,
        PlayerText:TimerDraw,
        Float:SaveX,
        Float:SaveY,
        Float:SaveZ,
        Float:SaveR
};
forward CreatePlayerChopper( gunnerid, npcname[  ], script[  ], length, pilotid );
forward ChopperHandler( gunnerid, func );
new PlayerInfo[ MAX_PLAYERS ][ pInfo ];
new obj[ MAX_CHOPPERS char ] = -1;
new objChopper[ MAX_OBJECTS char ] = -1;
new Timer[ MAX_OBJECTS char ];
new bool:Rocket[ MAX_OBJECTS ];
new Text:TextDraw[ 7 char ];
new ammo[ MAX_PLAYERS char ] = 0;
new pName[ MAX_PLAYERS ][ MAX_PLAYER_NAME ];
new pBotName[ MAX_PLAYERS ][ MAX_PLAYER_NAME ];
new PlayerText:AmmoTDraw[ MAX_PLAYERS char ];
#define AmmoTDraw[%0] AmmoTDraw{%0}
#define objChopper[%0] objChopper{%0}
#define TextDraw[%0] TextDraw{%0}
#define obj[%0] obj{%0}
#define Timer[%0] Timer{%0}
#define ammo[%0] ammo{%0}
public OnFilterScriptInit( )
{
    MapAndreas_Init( MAP_ANDREAS_MODE_FULL );
    TextDraw[ 0 ] = TextDrawCreate( -1.000000, 2.000000, "w" );
        TextDrawBackgroundColor( TextDraw[ 0 ], 255 );
        TextDrawFont( TextDraw[ 0 ], 1 );
        TextDrawLetterSize( TextDraw[ 0 ], 0.019998, 51.299999 );
        TextDrawColor( TextDraw[ 0 ], -1 );
        TextDrawSetOutline( TextDraw[ 0 ], 0 );
        TextDrawSetProportional( TextDraw[ 0 ], 1 );
        TextDrawSetShadow( TextDraw[ 0 ], 1 );
        TextDrawUseBox( TextDraw[ 0 ], 1 );
        TextDrawBoxColor( TextDraw[ 0 ], 100 );
        TextDrawTextSize( TextDraw[ 0 ], 642.000000, 30.000000 );
 
        TextDraw[ 1 ] = TextDrawCreate( 489.000000, 6.000000, "Uplink: 29.28.54#~n~       10x60 MHZ" );
        TextDrawBackgroundColor( TextDraw[ 1 ], 255 );
        TextDrawFont( TextDraw[ 1 ], 1 );
        TextDrawLetterSize( TextDraw[ 1 ], 0.500000, 1.000000 );
        TextDrawColor( TextDraw[ 1 ], -1 );
        TextDrawSetOutline( TextDraw[ 1 ], 0 );
        TextDrawSetProportional( TextDraw[ 1 ], 1 );
        TextDrawSetShadow( TextDraw[ 1 ], 1 );
 
        TextDraw[ 2 ] = TextDrawCreate( 601.000000, 25.000000, "Lazer: armed" );
        TextDrawBackgroundColor( TextDraw[ 2 ], 255 );
        TextDrawFont( TextDraw[ 2 ], 1 );
        TextDrawLetterSize( TextDraw[ 2 ], 0.170000, 1.000000 );
        TextDrawColor( TextDraw[ 2 ], -1 );
        TextDrawSetOutline( TextDraw[ 2 ], 0 );
        TextDrawSetProportional( TextDraw[ 2 ], 1 );
        TextDrawSetShadow( TextDraw[ 2 ], 1 );
 
        TextDraw[ 4 ] = TextDrawCreate( 308.000000, 218.000000, "-  -" );
        TextDrawBackgroundColor( TextDraw[ 4 ], 255 );
        TextDrawFont( TextDraw[ 4 ], 1 );
        TextDrawLetterSize( TextDraw[ 4 ], 0.500000, 1.000000 );
        TextDrawColor( TextDraw[ 4 ], -1 );
        TextDrawSetOutline( TextDraw[ 4 ], 0 );
        TextDrawSetProportional( TextDraw[ 4 ], 1 );
        TextDrawSetShadow( TextDraw[ 4 ], 1 );
 
        TextDraw[ 5 ] = TextDrawCreate( 321.750000, 210.000000, "!~n~~n~!" );
        TextDrawBackgroundColor( TextDraw[ 5 ], 255 );
        TextDrawFont( TextDraw[ 5 ], 1 );
        TextDrawLetterSize( TextDraw[ 5 ], 0.180000, 1.000000 );
        TextDrawColor( TextDraw[ 5 ], -1 );
        TextDrawSetOutline( TextDraw[ 5 ], 0 );
        TextDrawSetProportional( TextDraw[ 5 ], 1 );
        TextDrawSetShadow( TextDraw[ 5 ], 1 );
 
        TextDraw[ 6 ] = TextDrawCreate( 222.000000, 90.000000, "CAMERA: AH64-APACHE#" );
        TextDrawBackgroundColor( TextDraw[ 6 ], 255 );
        TextDrawFont( TextDraw[ 6 ], 1 );
        TextDrawLetterSize( TextDraw[ 6 ], 0.500000, 1.000000 );
        TextDrawColor( TextDraw[ 6 ], -1 );
        TextDrawSetOutline( TextDraw[ 6 ], 0 );
        TextDrawSetProportional( TextDraw[ 6 ], 1 );
        TextDrawSetShadow( TextDraw[ 6 ], 0 );
        for( new i = 0; i < MAX_PLAYERS; i ++ )
        {
            if( !IsPlayerConnected( i ) ) continue;
            GetPlayerName( i, pName[ i ], MAX_PLAYER_NAME );
            AmmoTDraw[ i ] = CreatePlayerTextDraw( i, 514.000000, 397.000000, "!!!!!!!!!!!!!!!!!!!!~n~!!!!!!!!!!!!!!!!!!!!" );
                PlayerTextDrawBackgroundColor( i, AmmoTDraw[ i ], 255 );
                PlayerTextDrawFont( i, AmmoTDraw[ i ], 1 );
                PlayerTextDrawLetterSize( i, AmmoTDraw[ i ], 0.500000, 1.000000 );
                PlayerTextDrawColor( i, AmmoTDraw[ i ], -1 );
                PlayerTextDrawSetOutline( i, AmmoTDraw[ i ], 0 );
                PlayerTextDrawSetProportional( i, AmmoTDraw[ i ], 1 );
                PlayerTextDrawSetShadow( i, AmmoTDraw[ i ], 1 );
               
                PlayerInfo[ i ][ TimerDraw ] = CreatePlayerTextDraw( i, 21.000000, 400.000000, "1:30min");
                PlayerTextDrawBackgroundColor( i, PlayerInfo[ i ][ TimerDraw ], 255);
                PlayerTextDrawFont( i, PlayerInfo[ i ][ TimerDraw ], 1);
                PlayerTextDrawLetterSize( i, PlayerInfo[ i ][ TimerDraw ], 0.500000, 1.000000);
                PlayerTextDrawColor( i, PlayerInfo[ i ][ TimerDraw ], -1);
                PlayerTextDrawSetOutline( i, PlayerInfo[ i ][ TimerDraw ], 0);
                PlayerTextDrawSetProportional( i, PlayerInfo[ i ][ TimerDraw ], 1);
                PlayerTextDrawSetShadow( i, PlayerInfo[ i ][ TimerDraw ], 0);
        }
}
public OnFilterScriptExit( )
{
        for( new i = 0 ; i < MAX_PLAYERS ; i ++ )
        {
            if( !IsPlayerConnected( i ) ) continue;
            PlayerTextDrawDestroy( i, AmmoTDraw[ i ] );
            PlayerTextDrawDestroy( i, PlayerInfo[ i ][ TimerDraw ] );
        }
    TextDrawHideForAll( TextDraw[ 0 ] );
        TextDrawDestroy( TextDraw[ 0 ] );
        TextDrawHideForAll( TextDraw[ 1 ] );
        TextDrawDestroy( TextDraw[ 1 ] );
        TextDrawHideForAll( TextDraw[ 2 ] );
        TextDrawDestroy( TextDraw[ 2 ] );
        TextDrawHideForAll( TextDraw[ 3 ] );
        TextDrawDestroy( TextDraw[ 3 ] );
        TextDrawHideForAll( TextDraw[ 4 ] );
        TextDrawDestroy( TextDraw[ 4 ] );
        TextDrawHideForAll( TextDraw[ 5 ] );
        TextDrawDestroy( TextDraw[ 5 ] );
        TextDrawHideForAll( TextDraw[ 6 ] );
        TextDrawDestroy( TextDraw[ 6 ] );
        return 1;
}
public OnPlayerCommandText( playerid, cmdtext[  ] )
{
    if ( !strcmp( cmdtext, SHOOT ) )
        {
            ammo[ PlayerInfo[ playerid ][ ChopperID ] ]++;
            new str[ 64 ];
            format( str, sizeof str, "~b~" );
            for( new i = 0 ; i < AMMO ; i++ )
            {
                if( i == AMMO/2 )
                        {
                                format( str, sizeof str, ( ( ammo[ PlayerInfo[ playerid ][ ChopperID ] ] != AMMO/2 ) ? ( "%s~n~!" ) : ( "%s~n~~w~!" ) ), str );
                            continue;
                        }
                        if( i == ammo[ PlayerInfo[ playerid ][ ChopperID ] ] )
                        {
                            format( str, sizeof str, "%s~w~!", str );
                            continue;
                        }
                        if( i < ammo[ PlayerInfo[ playerid ][ ChopperID ] ] )
                        {
                                format( str, sizeof str, "%s!", str );
                                continue;
                        }
                        format( str, sizeof str, "%s!", str );
                }
                PlayerTextDrawSetString( playerid, AmmoTDraw[ playerid ], str );
                new
                        Float:fPX, Float:fPY, Float:fPZ,
                        Float:fVX, Float:fVY, Float:fVZ,
                        Float:object_x, Float:object_y, Float:object_z;
                new
                        Float:fScale = 500;
 
                GetPlayerCameraPos( playerid, fPX, fPY, fPZ );
                GetPlayerCameraFrontVector( playerid, fVX, fVY, fVZ );
 
                object_x = fPX + floatmul( fVX, fScale );
                object_y = fPY + floatmul( fVY, fScale );
                object_z = fPZ + floatmul( fVZ, fScale );
                new obj1 = CreateObject( 345, fPX, fPY, fPZ, asin( fVZ ), 0.0, 360 - atan2( fVX, fVY ) );
                Rocket[ obj1 ] = true;
                objChopper[ obj1 ] = playerid;
                MoveObject( obj1, object_x, object_y, object_z, 75.0 );
                Timer[ obj1 ] = SetTimerEx( "CheckObj", 100, 1, "d", obj1 );
                if( ammo[ PlayerInfo[ playerid ][ ChopperID ] ] >= AMMO )
                {
                        ChopperHandler( playerid, 1 );
                        ammo[ PlayerInfo[ playerid ][ ChopperID ] ] = 0;
                }
                return 1;
        }
        if( !strcmp( "/chopper", cmdtext, true ) )
        {
                new str[ 24 ];
                format( str, sizeof str, "chopper%d", playerid );
                CreatePlayerChopper( playerid, str, "glenpark", 60, -1 );
            return 1;
        }
        if( !strcmp( "/stop", cmdtext, true ) )
        {
            ChopperHandler( playerid, 1 );
            return 1;
        }
        /*if( !strcmp( "/check", cmdtext, true ) )
        {
            new Float:x, Float:y, Float:z;
            GetPlayerPos( GetPlayerID( "Chopper" ) , x, y, z );
            SetPlayerPos( playerid, x, y, z );
        }
        if( !strcmp( cmdtext, "/test" ) )
        {
            new
                        Float:fVX, Float:fVY, Float:fVZ;
                GetPlayerCameraFrontVector( playerid, fVX, fVY, fVZ );
                new str[ 256 ];
            format( str, sizeof str, "XVec: %f YVec: %f ZVec: %f", fVX, fVY, fVZ );
            SendClientMessage( playerid, 0xFFFFFF, str );
            return 1;
        }*/
        return 0;
}
public CreatePlayerChopper( gunnerid, npcname[  ], script[  ], length, pilotid )
{
        switch( pilotid )
        {
                case -1:
                {
                if( !IsPlayerConnected( gunnerid ) ) return 0;
                    ConnectNPC( npcname, script );
                    format( pBotName[ gunnerid ], sizeof pBotName[  ], npcname );
                    SendClientMessage( gunnerid, 0xFFFFFFFF, "Verbьndeter Apache ist unterwegs!" );
                    PlayerInfo[ gunnerid ][ HasChopper ] = true;
                        GetPlayerPos( gunnerid, PlayerInfo[ gunnerid ][ SaveX ], PlayerInfo[ gunnerid ][ SaveY ], PlayerInfo[ gunnerid ][ SaveZ ] );
                    GetPlayerFacingAngle( gunnerid, PlayerInfo[ gunnerid ][ SaveR ] );
                    new str[ 32 ];
                    PlayerInfo[ gunnerid ][ chpTime ] = length;
                    format( str, sizeof str, "%d:%dmin" , length / 60, length - 60 * ( length / 60 ) );
                    PlayerTextDrawSetString( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ], str );
                    return 1;
                }
                default:
                {
                    if( !IsPlayerConnected( pilotid ) ) return 0;
                    if( !IsPlayerConnected( gunnerid ) ) return 0;
                    PlayerInfo[ gunnerid ][ ChopperID ] = pilotid;
                    obj[ pilotid ] = CreateObject( 330, 0, 0, 235, 0 , 0, 0, 0.0 );
                    PlayerInfo[ pilotid ][ chopper ] = CreateVehicle( 425, 0, 0, 0, 0, 0, 0, -1 );
                    AttachObjectToVehicle( obj[ pilotid ], PlayerInfo[ pilotid ][ chopper ], 0, 4.45, -1.2, 0, 0, 0 );
                   
                    PutPlayerInVehicle( pilotid, PlayerInfo[ pilotid ][ chopper ], 0 );
                    PutPlayerInVehicle( gunnerid, PlayerInfo[ pilotid ][ chopper ], 1 );
                   
                    PlayerInfo[ gunnerid ][ chpTime ] = length;
                   
                        GetPlayerPos( gunnerid, PlayerInfo[ gunnerid ][ SaveX ], PlayerInfo[ gunnerid ][ SaveY ], PlayerInfo[ gunnerid ][ SaveZ ] );
                    GetPlayerFacingAngle( gunnerid, PlayerInfo[ gunnerid ][ SaveR ] );
                   
                        GetPlayerPos( pilotid, PlayerInfo[ pilotid ][ SaveX ], PlayerInfo[ pilotid ][ SaveY ], PlayerInfo[ pilotid ][ SaveZ ] );
                    GetPlayerFacingAngle( pilotid, PlayerInfo[ pilotid ][ SaveR ] );
                   
                    new str[ 32 ];
                    format( str, sizeof str, "%d:%dmin" , length / 60, length - 60 * ( length / 60 ) );
                    PlayerTextDrawSetString( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ], str );
                    PlayerTextDrawSetString( pilotid, PlayerInfo[ pilotid ][ TimerDraw ], str );
                   
                    PlayerInfo[ gunnerid ][ timer ] = SetTimerEx( "ChopperHandler", 500, 1, "dd", gunnerid, 0 );
                   
                    AttachCameraToObject( gunnerid, obj[ pilotid ] );
                   
                    TextDrawShowForPlayer( gunnerid, TextDraw[ 0 ] );
                        TextDrawShowForPlayer( gunnerid, TextDraw[ 1 ] );
                        TextDrawShowForPlayer( gunnerid, TextDraw[ 2 ] );
                       
                        PlayerTextDrawShow( gunnerid, AmmoTDraw[ gunnerid ] );
                        PlayerTextDrawShow( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ] );
                        PlayerTextDrawShow( pilotid, PlayerInfo[ pilotid ][ TimerDraw ] );
                       
                        TextDrawShowForPlayer( gunnerid, TextDraw[ 4 ] );
                        TextDrawShowForPlayer( gunnerid, TextDraw[ 5 ] );
                        TextDrawShowForPlayer( gunnerid, TextDraw[ 6 ] );
                    return 1;
                }
        }
        return 0;
}
public OnPlayerDisconnect( playerid )
{
        if( PlayerInfo[ playerid ][ HasChopper ] )
        {
            if( IsPlayerNPC( PlayerInfo[ playerid ][ ChopperID ] ) )
                        Kick( PlayerInfo[ playerid ][ ChopperID ] );
        }
        if( PlayerInfo[ playerid ][ HasChopper ] )
        ChopperHandler( playerid, 1 );
        PlayerInfo[ playerid ][ HasChopper ] = false;
        for( new i = 0; i < MAX_PLAYERS; i ++ )
        {
            if( !IsPlayerConnected( i ) || !PlayerInfo[ i ][ HasChopper ] ) continue;
            if( PlayerInfo[ i ][ ChopperID ] == playerid)
                return ChopperHandler( playerid, 1 );
        }
        return 0;
}
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
        if( newkeys & KEY_FIRE && PlayerInfo[ playerid ][ HasChopper ] )  OnPlayerCommandText( playerid, SHOOT );
        return 0;
}
public OnObjectMoved( objectid )
{
    if( !Rocket[ objectid ] ) return 1;
        KillTimer( Timer[ objectid ] );
        Timer[ objectid ] = -1;
        new
                Float:x, Float:y, Float:z, Float:Dist;
        GetObjectPos( objectid, x, y, z );
        CreateExplosion( x, y, z, 0, 10.0 );
        for( new i = 0; i < MAX_PLAYERS; i ++ )
        {
            if( !IsPlayerConnected( i ) ) continue;
                Dist = GetPlayerDistanceFromPoint( i, x, y, z);
                if( Dist < 10.0 )
                {
                    new Float:HP,Float:NewHP;
                    GetPlayerHealth( i, HP );
                    NewHP = HP-150+Dist*10;
                    if( NewHP >= HP )
                        {
                            TogglePlayerSpectating( i, 1 );
                            TogglePlayerSpectating( i, 0 );
                                CallRemoteFunction( "OnPlayerDeath", "ddd", i, objChopper[ objectid ], 51 );
                    }
                    else SetPlayerHealth( i, NewHP );
                }
        }
        Rocket[ objectid ] = false;
        DestroyObject( objectid );
        return 0;
}
forward CheckObj( objid );
public CheckObj( objid )
{
    if( !Rocket[ objid ] ) return 1;
    new
                Float:x, Float:y, Float:z, Float:Z, Float:Dist;
        GetObjectPos( objid, x, y, z );
    MapAndreas_FindZ_For2DCoord( x, y, Z );
    if( Z > z || ( z - Z ) < 5.0 )
    {
        KillTimer( Timer[ objid ] );
                Timer[ objid ] = -1;
                CreateExplosion( x, y, z, 0, 10.0 );
                for( new i = 0; i < MAX_PLAYERS; i ++ )
                {
                    if( !IsPlayerConnected( i ) ) continue;
                        Dist = GetPlayerDistanceFromPoint( i, x, y, z);
                        if( Dist < 10.0 )
                        {
                            new Float:HP,Float:NewHP;
                            GetPlayerHealth( i, HP );
                            NewHP = HP-150+Dist*10;
                            if( NewHP >= HP )
                                {
                                    TogglePlayerSpectating( i, 1 );
                                    TogglePlayerSpectating( i, 0 );
                                        CallRemoteFunction( "OnPlayerDeath", "ddd", i, objChopper[ objid ], 51 );
                            }
                            else SetPlayerHealth( i, NewHP );
                        }
                }
                Rocket[ objid ] = false;
                DestroyObject( objid );
        }
        return 1;
}
public ChopperHandler( gunnerid, func )
{
        switch( func )
        {
            case 0:
                {
                        if( !IsPlayerConnected( gunnerid ) ) return KillTimer( PlayerInfo[ gunnerid ][ timer ] );
                        if( !IsPlayerConnected( PlayerInfo[ gunnerid ][ ChopperID ] ) ) return KillTimer( PlayerInfo[ gunnerid ][ timer ] );
                    PlayerInfo[ gunnerid ][ change ] = PlayerInfo[ gunnerid ][ change ] ? false : true;
                        if( PlayerInfo[ gunnerid ][ change ] )
                        {
                                PlayerInfo[ gunnerid ][ chpTime ] -- ;
                                new str[32];
                                format( str, sizeof str, "%d:%02dmin" , PlayerInfo[ gunnerid ][ chpTime ] / 60,
                                PlayerInfo[ gunnerid ][ chpTime ] - 60 * ( PlayerInfo[ gunnerid ][ chpTime ] / 60 ) );
                                PlayerTextDrawSetString( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ], str);
                                PlayerTextDrawSetString( PlayerInfo[ gunnerid ][ ChopperID ],PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ TimerDraw ], str );
                        }
                        if(PlayerInfo[ gunnerid ][ chpTime ] < 30)
                        {
                                if( PlayerInfo[ gunnerid ][ change ] )
                                {
                                        PlayerTextDrawHide( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ] );
                                        if( !IsPlayerNPC( PlayerInfo[ gunnerid ][ ChopperID ] ) )
                                                PlayerTextDrawHide( PlayerInfo[ gunnerid ][ ChopperID ], PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ TimerDraw ] );
                                }
                                else
                                {
                                        PlayerTextDrawShow( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ] );
                                        if( !IsPlayerNPC( PlayerInfo[ gunnerid ][ ChopperID ] ) )
                                                PlayerTextDrawShow( PlayerInfo[ gunnerid ][ ChopperID ], PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ TimerDraw ] );
                                }
                        }
                        if(PlayerInfo[ gunnerid ][ chpTime ] <= 0) KillTimer( PlayerInfo[ gunnerid ][ timer ] ), ChopperHandler( gunnerid, 1 );
                }
            case 1:
                {
                    PlayerInfo[ gunnerid ][ HasChopper ] = false;
                    new ID = GetPlayerID( pBotName[ gunnerid ] );
                    if( IsPlayerNPC( ID ) )
                        {
                            Kick( ID );
                            ammo[ ID ] = 0;
                            DestroyVehicle( PlayerInfo[ ID ][ chopper ] );
                            DestroyObject( obj[ ID ] );
                            obj[ ID ] = -1;
                        }
                        else
                        {
                                ammo[ PlayerInfo[ gunnerid ][ ChopperID ] ] = 0;
                            DestroyVehicle( PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ chopper ] );
                            DestroyObject( obj[ PlayerInfo[ gunnerid ][ ChopperID ] ] );
                            obj[ PlayerInfo[ gunnerid ][ ChopperID ] ] = -1;
                        }
                    SetCameraBehindPlayer( gunnerid );
                   
                    SetPlayerPos( gunnerid, PlayerInfo[ gunnerid ][ SaveX ], PlayerInfo[ gunnerid ][ SaveY ], PlayerInfo[ gunnerid ][ SaveZ ] );
                    SetPlayerFacingAngle( gunnerid, PlayerInfo[ gunnerid ][ SaveR ] );
                   
                    SetPlayerPos( PlayerInfo[ gunnerid ][ ChopperID ],
                                PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ SaveX ],
                                PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ SaveY ],
                                PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ SaveZ ] );
                        SetPlayerFacingAngle( PlayerInfo[ gunnerid ][ ChopperID ], PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ SaveR ] );
                       
                    TextDrawHideForPlayer( gunnerid, TextDraw[ 0 ] );
                        TextDrawHideForPlayer( gunnerid, TextDraw[ 1 ] );
                        TextDrawHideForPlayer( gunnerid, TextDraw[ 2 ] );
                        TextDrawHideForPlayer( gunnerid, TextDraw[ 4 ] );
                        TextDrawHideForPlayer( gunnerid, TextDraw[ 5 ] );
                        TextDrawHideForPlayer( gunnerid, TextDraw[ 6 ] );
                       
                        PlayerTextDrawHide( gunnerid, AmmoTDraw[ gunnerid ] );
                        PlayerTextDrawHide( gunnerid, PlayerInfo[ gunnerid ][ TimerDraw ] );
                        PlayerTextDrawHide( PlayerInfo[ gunnerid ][ ChopperID ], PlayerInfo[ PlayerInfo[ gunnerid ][ ChopperID ] ][ TimerDraw ] );
                    PlayerInfo[ gunnerid ][ ChopperID ] = -1;
                        return 1;
            }
        }
        return 1;
}
public OnPlayerConnect( playerid )
{
        if( !IsPlayerNPC( playerid) )
        {
                GetPlayerName( playerid, pName[ playerid ], MAX_PLAYER_NAME );
                AmmoTDraw[ playerid ] = CreatePlayerTextDraw( playerid, 514.000000, 397.000000, "!!!!!!!!!!!!!!!!!!!!~n~!!!!!!!!!!!!!!!!!!!!" );
                PlayerTextDrawBackgroundColor( playerid, AmmoTDraw[ playerid ], 255 );
                PlayerTextDrawFont( playerid, AmmoTDraw[ playerid ], 1 );
                PlayerTextDrawLetterSize( playerid, AmmoTDraw[ playerid ], 0.500000, 1.000000 );
                PlayerTextDrawColor( playerid, AmmoTDraw[ playerid ], -1 );
                PlayerTextDrawSetOutline( playerid, AmmoTDraw[ playerid ], 0 );
                PlayerTextDrawSetProportional( playerid, AmmoTDraw[ playerid ], 1 );
                PlayerTextDrawSetShadow( playerid, AmmoTDraw[ playerid ], 1 );
 
                PlayerInfo[ playerid ][ TimerDraw ] = CreatePlayerTextDraw( playerid, 21.000000, 400.000000, "1:30min");
                PlayerTextDrawBackgroundColor( playerid, PlayerInfo[ playerid ][ TimerDraw ], 255);
                PlayerTextDrawFont( playerid, PlayerInfo[ playerid ][ TimerDraw ], 1);
                PlayerTextDrawLetterSize( playerid, PlayerInfo[ playerid ][ TimerDraw ], 0.500000, 1.000000);
                PlayerTextDrawColor( playerid, PlayerInfo[ playerid ][ TimerDraw ], -1);
                PlayerTextDrawSetOutline( playerid, PlayerInfo[ playerid ][ TimerDraw ], 0);
                PlayerTextDrawSetProportional( playerid, PlayerInfo[ playerid ][ TimerDraw ], 1);
                PlayerTextDrawSetShadow( playerid, PlayerInfo[ playerid ][ TimerDraw ], 0);
        }
        else
        {
                for( new i = 0; i < MAX_PLAYERS; i ++ )
                {
                    if( !IsPlayerConnected( i ) ) continue;
                        if( !strcmp( pName[ playerid ], pBotName[ i ] ) && pBotName[ i ][ 0 ] )
                    {
                        PlayerInfo[ i ][ ChopperID ] = playerid;
                            obj[ playerid ] = CreateObject( 330, 0, 0, 235, 0 , 0, 0, 0.0 );
                            PlayerInfo[ playerid ][ chopper ] = CreateVehicle( 425, 0, 0, 235, 0, 0, 0, -1 );
                            AttachObjectToVehicle( obj[ playerid ], PlayerInfo[ playerid ][ chopper ], 0, 4.45, -1.2, 0, 0, 0 );
                            PutPlayerInVehicle( playerid, PlayerInfo[ playerid ][ chopper ], 0 );
                                PutPlayerInVehicle( i, PlayerInfo[ playerid ][ chopper ], 1 );
                                PlayerInfo[ i ][ timer ] = SetTimerEx( "ChopperHandler", 500, 1, "dd", i, 0 );
                            AttachCameraToObject( i, obj[ playerid ] );
                            TextDrawShowForPlayer( i, TextDraw[ 0 ] );
                                TextDrawShowForPlayer( i, TextDraw[ 1 ] );
                                TextDrawShowForPlayer( i, TextDraw[ 2 ] );
                                PlayerTextDrawShow( i, AmmoTDraw[ i ] );
                                PlayerTextDrawShow( i, PlayerInfo[ i ][ TimerDraw ] );
                                TextDrawShowForPlayer( i, TextDraw[ 4 ] );
                                TextDrawShowForPlayer( i, TextDraw[ 5 ] );
                                TextDrawShowForPlayer( i, TextDraw[ 6 ] );
                        break;
                    }
                }
        }
        return 0;
}
public OnPlayerDeath( playerid, killerid, reason)
{
    if( PlayerInfo[ playerid ][ HasChopper ] )
        ChopperHandler( playerid, 1 );
        for( new i = 0; i < MAX_PLAYERS; i ++ )
        {
            if( !IsPlayerConnected( i ) || !PlayerInfo[ i ][ HasChopper ] ) continue;
            if( PlayerInfo[ i ][ ChopperID ] == playerid)
                return ChopperHandler( playerid, 1 );
        }
        return 0;
}
GetPlayerID( playername[  ] )
{
        for( new i = 0; i < MAX_PLAYERS; i++ )
        {
            if( !IsPlayerConnected( i ) ) continue;
            if( !strcmp( playername, pName[ i ] ) ) return i;
        }
        return -1;
}
Ese es el cуdigo. El FS consiste en un "chopper gunner", vamos, un sistema tipo apoyo aйreo del COD MW2 que te permite disparar desde un helicуptero como copiloto mientras conduces. Los crйditos del sistema son para RGRealGamer, que fue el creador 100% de este sistema. Yo, Kevin Manzano, me pasй varias horas buscando en ****** y tratando de encontrar un sistema de apoyo aйreo para samp, pero lo ъnico que veнa eran vнdeos nada mбs. Nadie liberaba ningъn sistema de este tipo. Me costу un montуn encontrar este sistema, y lo ъnico que quiero pedirles a cambio es que me ayudasen o me dijesen cуmo agregarlo al GM de Zenon City. Sй que tengo que crear un NPC que controle el helicуptero, pero lo he intentado y no hay manera, he seguido tutoriales y todo y no me va en el GM de Zenon City.

El post original es este: http://forum.sa-mp.de/san-andreas-mu...e%C2%B2-v-1-0/

Les muestro un vнdeo del sistema en funcionamiento, si es incorrecto publicar vнdeos aquн me corrigen y lo quito:
[ame]www.youtube.com/watch?v=KLdZlOwQFl8[/ame]

Espero que puedan ayudarme a instalar este sistema, es que lo quiero para agregarlo a un sistema de eventos de DM que estoy creando. Saludos y espero que este aporte sirva a mucha gente.
Reply
#2

Perdonen doble post pero, alguien me podrнa ayudar a instalar este sistema? algъn scripter profesional como the_chaoz por ejemplo u OTACON, cualquier ayuda me vendrнa bien. Saludos
Reply
#3

Primero que nada, si no puedes hacerlo tu y quieres que alguien te lo ponga en tu GM, este post es la solucion.

Segundo si quieres saber como, es facil solo aсade las variables del FS en el GM y todo lo que corresponde en cada callback, si tienen el mismo nombre las variables puedes renombrar las de alguno de los dos scripts antes que te de errores, es facil aun que no conosco ese GM es basicamente lo mismo en todos.

Tercero

Quote:
Originally Posted by KevinManTx
Посмотреть сообщение
Perdonen doble post pero, alguien me podrнa ayudar a instalar este sistema? algъn scripter profesional como the_chaoz por ejemplo u OTACON, cualquier ayuda me vendrнa bien. Saludos

algъn scripter profesional como the_chaoz por ejemplo u OTACON

OTACON


No es por ser malo con OTACON, si no que si pides la ayuda de uno en especifico es algo malo por que los demas que si te pueden ayudar al momento no tendran animos de hacerlo, con respecto a the_chaoz es de los mejores de la seccion, lamentablemente dispone de poco tiempo para ayudar ya que es moderador y debe estar vigilando los foros.

Pd si lo intentas agregar y tienes errores puedes postearlos estamos para ayudarte.
Reply
#4

Quote:
Originally Posted by KevinManTx
Посмотреть сообщение
Perdonen doble post pero, alguien me podrнa ayudar a instalar este sistema? algъn scripter profesional como the_chaoz por ejemplo u OTACON, cualquier ayuda me vendrнa bien. Saludos
O_O Estas Borracho? LOL
Reply
#5

Por suerte estoy ebrio y suelo estarlo siempre. Pero bueno, llбmame borracho por considerarte buen Scripter. Con respecto a ti xSDx, fнjate que al final de la frase dice "cualquier ayuda me vendrнa bien", eso quiere decir que invito a toda persona que quiera ayudarme a comentar, solo nombrй a 2 Scripters que yo consideraba "profesionales" bajo mi punto de vista y eso tenйis que ser capaces de respetarlo ya que muchas cosas en este mundo son relativas. Dado que no hay ninguna lista del samp donde salga quй Scripter es mбs profesional y cuбl menos, todo el mundo tiene derecho a considerar profesionales a los que quiera.

Y ya, yendo al meollo del asunto, el tema es que sй que para agregar el sistema es haciendo un npc, y cuбndo intento hacerlo con el GM de Zenon City no me funciona. Lo hago correctamente siguiendo los tutoriales correspondientes y no me funciona en el GM de Zenon City. Con respecto al tema del Filterscript, al guardar y compilarlo me va perfecto, el ъnico problema que daba al principio era que daba el warning loose indentation, pero lo solucionй fбcilmente con un #pragma tabsize 0. Una vez hice esto el FS compilу a la perfecciуn, pero al entrar al sv ingame y poner el cmd correspondiente no me funcionaba como en el vнdeo. Por eso querнa invitar a alguien a testearlo y a intentar agregarlo a su servidor correspondiente (o uno que tengan de prueba para scriptear, me da lo mismo), para que asн me dijeran si les funcionу y yo poder seguir sus pasos.
Reply
#6

Yo estaria mas que dispuesto a ayudarte, pero odio el rolplay ademas que no conosco ese tal gm
Reply
#7

no te enojes, era broma nada mas, y sobre el tema digo lo mismo ke xSDx... no conozco ese GM, lo poco ke se de ese gm es ke tiene muchos Bugs :S xD. por eso creo ke lo han liberado .

Saludos.

PD: y gracias por considerarme professional
Reply
#8

Yo lo conozco bastante bien el GM, pero al agregar el FS no me funciona correctamente. Ya hice el pedido en la secciуn de Pedidos de Scripts, a ver si alguien me ayuda bien por este post bien por esa secciуn. Si alguien consigue testearlo y que le funcione seguro se alegrarб bastante, ya que es muy difнcil encontrar un sistema como este de "Chopper Gunner" liberado, y yo lo encontrй hace dos dнas. Saludos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)