Advertisement
Nikczemny

Untitled

Mar 6th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. _myCuteLittleEvent = (findDisplay 46) displayAddEventHandler ["KeyDown", "
  2. _keyDown = _this select 1;
  3. if (_keyDown == " + str (29) + ") then {call MY_KEYDOWN_FNC; };
  4. false;
  5. "];
  6.  
  7. MY_KEYDOWN_FNC = { _vcl = vehicle player; if(_vcl == player)exitwith{}; _nos = _vcl getvariable "nitro"; _supgrade = _vcl getvariable "supgrade"; if(isEngineOn _vcl) then { switch (_this) do { case 17: { if(isEngineOn _vcl and !isnil "_supgrade") then { _vcl SetVelocity [(velocity _vcl select 0) * 1.011, (velocity _vcl select 1) *1.011, (velocity _vcl select 2) * 0.99]; } else { _vcl setvariable ["supgrade", 1, true]; }; }; case 42: { if(isEngineOn _vcl and !isnil "_nos") then { _vcl setVelocity [(velocity _vcl select 0) * 1.01, (velocity _vcl select 1) * 1.01, (velocity _vcl select 2) * 0.99]; } else { _vcl setvariable ["nitro", 1, true]; }; }; }; }; };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement