-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from noxsicarius/master
CleanUp & Fixes
- Loading branch information
Showing
6 changed files
with
45 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
// Toggle grass on or off | ||
// last edit: NoxSicarius | ||
if(isNil "grassToggle") then{grassToggle = true;} else {grassToggle = !grassToggle;}; | ||
|
||
if(isNil "grassToggle") then | ||
if (grassToggle) then | ||
{ | ||
grassToggle = 0; | ||
}; | ||
|
||
if (grassToggle == 0) then | ||
{ | ||
grassToggle = 1; | ||
cutText ["Grass - OFF", "PLAIN DOWN"]; | ||
setterraingrid 50; | ||
} | ||
else | ||
{ | ||
grassToggle = 0; | ||
cutText ["Grass - ON", "PLAIN DOWN"]; | ||
setterraingrid 25;}; | ||
}; | ||
|
||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
waituntil {!isnull (finddisplay 46)}; | ||
(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call MY_KEYDOWN_FNC;false;"]; | ||
MY_KEYDOWN_FNC = { | ||
if (isNil "speedToggle") then {speedToggle = true;} else { speedToggle = !speedToggle;}; | ||
|
||
_vcl = vehicle player; | ||
if(_vcl == player)exitwith{}; | ||
if (speedToggle) then { | ||
waituntil {!isnull (finddisplay 46)}; | ||
SPEED_UP =(findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call MY_KEYDOWN_FNC;false;"]; | ||
|
||
_nos = _vcl getvariable "nitro"; | ||
_supgrade = _vcl getvariable "supgrade"; | ||
MY_KEYDOWN_FNC = { | ||
|
||
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]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
_vcl = vehicle player; | ||
if(_vcl == player)exitwith{}; | ||
|
||
hint "Speed Boost"; | ||
_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];}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
titleText ["Speed Boost - ON","PLAIN DOWN"];titleFadeOut 2; | ||
} | ||
else{ | ||
(findDisplay 46) displayRemoveEventHandler ["KeyDown", SPEED_UP]; | ||
titleText ["Speed Boost - OFF","PLAIN DOWN"];titleFadeOut 2; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters