[FilterScript] HandBrake
#1

HANDBRAKE
( only functional in the R5 )
Today i bring a filterscript for roleplay server, which acts as a brake of a car stopping in reality this is mobilized.

The only command is /handbrake both to activate and to deactivate it.

Video:

[ame]http://www.youtube.com/watch?v=J08zTeqjid0[/ame]

Pastebin http://pastebin.com/bZEGCeKz


Update:
- With keys:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new coche = GetPlayerVehicleID(playerid);
            new nombre[MAX_PLAYER_NAME], string_freno[128], partes[7];
            GetPlayerName(playerid, nombre, sizeof(nombre));
            if(FrenodeMano[coche] == 1)
            {
                FrenodeMano[coche] = 0;
                if(idioma == 0) format(string_freno, sizeof(string_freno), "* %s quitу el freno de mano al vehнculo.", nombre);
                if(idioma == 1) format(string_freno, sizeof(string_freno), "* %s took the hand brake the vehicle.", nombre);
                ProxDetector(30.0, playerid, string_freno, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                GetVehicleParamsEx(coche, partes[0], partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
                SetVehicleParamsEx(coche,VEHICLE_PARAMS_ON, partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
                return 1;
            }
            if(FrenodeMano[coche] == 0)
            {
                FrenodeMano[coche] = 1;
                GetVehiclePos(coche, VehFrenoPOS[coche][0], VehFrenoPOS[coche][1], VehFrenoPOS[coche][2]);
                GetVehicleZAngle(coche, VehFrenoPOS[coche][3]);
                SetVehicleVelocity(coche, 0, 0, 0);
                if(idioma == 0) format(string_freno, sizeof(string_freno), "* %s colocу el freno de mano al vehнculo.", nombre);
                if(idioma == 1) format(string_freno, sizeof(string_freno), "* %s put the hand brake the vehicle.", nombre);
                ProxDetector(30.0, playerid, string_freno, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                GetVehicleParamsEx(coche, partes[0], partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
                SetVehicleParamsEx(coche,VEHICLE_PARAMS_OFF, partes[1], partes[2], partes[3], partes[4], partes[5], partes[6]);
                return 1;
            }
        }
    }
    return 1;
}
Sorry for my English, I am Argentine.

[J]Ulian.
Reply


Messages In This Thread
HandBrake [ R5 ] - by [J]ulian - 01.08.2011, 07:40
Re: HandBrake - by _DownLoaD_ - 01.08.2011, 08:25
Re: HandBrake - by VoViNaToR - 01.08.2011, 08:49
Respuesta: HandBrake - by [J]ulian - 01.08.2011, 08:59
Re: HandBrake - by gold - 01.08.2011, 11:48
Respuesta: HandBrake - by [J]ulian - 01.08.2011, 12:26
Re: HandBrake - by Famalamalam - 01.08.2011, 13:50
Re: HandBrake - by VoViNaToR - 01.08.2011, 17:06
Re: HandBrake - by Famalamalam - 01.08.2011, 18:18
Respuesta: Re: HandBrake - by [J]ulian - 01.08.2011, 21:01
Re: HandBrake - by TheArcher - 01.08.2011, 21:05
Respuesta: Re: HandBrake - by [J]ulian - 02.08.2011, 20:46
Re: HandBrake - by Calgon - 02.08.2011, 20:48
Respuesta: Re: HandBrake - by [J]ulian - 02.08.2011, 22:36
Re: HandBrake - by sherlock - 03.08.2011, 20:36

Forum Jump:


Users browsing this thread: 4 Guest(s)