Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GTA;
- using GTA.Math;
- using GTA.Native;
- using NativeUI;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq.Expressions;
- using System.Windows.Forms;
- using System.Linq;
- public class indicatorscript : Script
- { Ped PlayerPed;
- Vehicle vehicle;
- string Scriptname = "Indicator Script";
- string ScriptVersion = " 1.0 ";
- string ScriptAuthor = "YCSM aka ashishcw for Yeahhmonkey";
- bool isleftindicatoron = false;
- bool isrightindicatoron = false;
- bool arebothindicatoron = false;
- Keys Modactive;
- Keys leftindicator;
- Keys rightindicator;
- public indicatorscript()
- {
- {
- Tick += onTick;
- KeyUp += onKeyUp;
- PlayerPed = Game.Player.Character;
- UI.Notify(Scriptname + ScriptVersion + "by " + ScriptAuthor);
- //LoadSettings();
- }
- }
- void onTick(Object sender, EventArgs e)
- {
- isleftindicatoron = true;
- isleftindicatoron = true;
- arebothindicatoron = true;
- }
- void LoadSettings()
- {
- if (isrightindicatoron == false)
- {
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, false);
- }
- if (isrightindicatoron == false)
- {
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 0, false);
- }
- if (arebothindicatoron == false)
- {
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, 0, false);
- }
- }
- public void onKeyUp(object sender, KeyEventArgs e)
- {
- if(e.KeyCode == Keys.T)
- {
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 0, false);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, true);
- Wait(5000);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, false);
- //isleftindicatoron = false;
- }
- if (e.KeyCode == Keys.Y)
- {
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, false);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 0, true);
- Wait(5000);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 0, false);
- //isrightindicatoron = false;
- }
- if (e.KeyCode == Keys.G)
- {
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, true);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 0, true);
- Wait(5000);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 1, false);
- Function.Call(Hash.SET_VEHICLE_INDICATOR_LIGHTS, PlayerPed.CurrentVehicle, 0, false);
- }
- }
- }
Add Comment
Please, Sign In to add comment