Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer Notification #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions BIS_AddonInfo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class BIS_AddonInfo
{
author="";
timepacked="1587257288";
};
57 changes: 57 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Simple Single Player Cheat Menu by Benargee
This work is licensed under the Arma Public License Share Alike http://www.bistudio.com/community/licenses/arma-public-license-share-alike

---v1.0
--March 19, 2015
-Initial Release

---v1.0.1
--March 19, 2015
-Changed All "InitTest" file paths to "SSPCM". Mod no longer broken

---v1.0.2
--March 20, 2015
-Added a delay to menu init script. Should hopefully fix the problem a few people have been having
-Redifined a few functions to proper names BRG_fnc_postInit and BRG_fnc_preInit

---v1.0.3
--March 22, 2015
Added: Support for multiple units. When player changes unit, cheat menu will now function properly
Fixed: Second attempt at fixing the issue where menu will not show up for some users. Mod will check every 4 seconds to see if menu is visible. This will insure it always appears. Wait up to 10 seconds for menu to appear.
Fixed: Changed some more function definitions using CfgFunctions.
Known Issue: When player switches unit, old cheat attributes will still be active. This may or may not be an issue for users. Optional solution is planned.
Known Issue: Cheat menu may not work when loading a game save. Only works reliably in freshly started missions. Thank you nubmarine for pointing that out!

---v1.1.0
--March 25, 2015
Added: Bullet Cam
Added: Bullet Tracing
Added: Disable fatigue
Added: Infinite ammo
Added: Vehicle invincibility (under invincibility)
Changed: "Ignored by enemy" to "Side relations"
Added: Friendly to allies and Hostile to everyone
Added: Spawn in Jet. Player will spawn in jet that is in flight.
Added: 3D Teleport. Now you can teleport where you look

---v1.1.5
--June 1, 2015
Fixed: All addon content should be available with Zeus.
Added: Button in map screen to manually initialize SSPCM when resuming a mission.
Fixed: When spawning in flying jet, map is now automatically closed.
Fixed: When teleporting, player will now be teleported with their vehicle. This can optionally be changed to previous behaviour.
Added: Link to Zeus field manual in Zeus sub-menu. this is especially helpful for players new to Zeus and Arma.
Added: Virtual Garage menu option. Thank you tortuosit for laying out the code for me!
Added: Ability to open debug console in map screen in addition to existing action menu option.

---v1.1.6 (Contact Menu Fix)
--August 10, 2019
Added: Experimental UI menu to Contact Only
Changed: Refactored a lot of code to allow old and new menu to coexist.
Known bug: Spawn in jet doesn't entirely work. Use at own risk.
Known bug: Various script errors but nothing that seems to effect functionality

---v1.1.7 (Old Man Hotfix)
--April 19, 2020
Changed: Now loads new cheat menu in Old Man, Tanoa mission
Note: No other changes as this is a quick fix for Old Man. Other fixes will be left for later verisons.
16 changes: 16 additions & 0 deletions CheatDiary/CheatInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//Script Created By Benargee, 2015. http://wiki.benargee.com http://www.benargee.com http://steamcommunity.com/id/Benargee/

//Check if cheat menu enabled. Supports ability for player to switch units.
BRG_MenuLoop = true;

0 Spawn {
while {BRG_MenuLoop} do
{
if (!(player diarySubjectExists "BRG_CheatMenu")) then {[] spawn BRG_fnc_cheatMenu;

//if ((!BRG_MPNotified) and (isMultiplayer) and (!serverCommandAvailable "#logout")) then {[] spawn BRG_fnc_MPCheatNotif};//only on multiplayer and if player isnt an admin

};
sleep 4;
};
};
41 changes: 41 additions & 0 deletions CheatDiary/CheatMenu.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//Script Created By Benargee, 2015. http://wiki.benargee.com http://www.benargee.com http://steamcommunity.com/id/Benargee/
//TODO: Change all BRG to BNRG.
//--------//Bottom of list//--------//

sleep 1;//test

player createDiarySubject ["BRG_CheatMenu","Cheats!"];

//Info
"diary" call BRG_fnc_CMInfo;
//separator
player createDiaryRecord ["BRG_CheatMenu", ["==========","Move along, nothing to see here."]];
//Zeus
"diary" call BRG_fnc_CMZeus;
//Virtual Garage
"diary" call BRG_fnc_CMVGarage;
//Virtual Arsenal
"diary" call BRG_fnc_CMVArsenal;
//Teleport
"diary" call BRG_fnc_CMTeleport;
//Spawn in Flying Jet
"diary" call BRG_fnc_CMFlyingJet;
//Side relations
"diary" call BRG_fnc_CMSideRelations;
//Invincibility
"diary" call BRG_fnc_CMInvincible;
//Infinite Ammo
"diary" call BRG_fnc_CMInfAmmo;
//Fatigue
"diary" call BRG_fnc_CMFatigue;
//Debug Console
"diary" call BRG_fnc_CMDebug;
//Bullet Tracing
"diary" call BRG_fnc_CMBulletTracing;
//Bullet Cam
"diary" call BRG_fnc_CMBulletCam;

//--------//Top of list//--------//



33 changes: 33 additions & 0 deletions CheatDiary/Options/BulletCam.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
if (isNil "BRG_BulletCam_init") then {
BRG_BulletCam_init = true;

BRG_BulletCamStatus = false;//prevents multiple eventhandler entries

BRG_BulletCamOn = {
if (!BRG_BulletCamStatus) then {
BRG_BulletCamStatus = true;
BRG_BulletCamID = call BRG_fnc_BulletCamBasic;
};
hint 'Bullet cam ENABLED';
PUB_PN = name player;publicVariable "PUB_PN";format ["%1 uses BulletCam", PUB_PN] remoteExec ["systemChat"];
};

BRG_BulletCamOff = {
BRG_BulletCamStatus = false;
player removeEventHandler ["fired", BRG_BulletCamID];
hint 'Bullet cam DISABLED';
};
};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Bullet Cam", "Bullet Cam <font color='#33CC33'><execute expression = '[] call BRG_BulletCamOn'>Enabled</execute></font color> <font color='#CC0000'><execute expression = '[] call BRG_BulletCamOff'>Disabled</execute></font color><br/><br/>

Press the SPACE bar at any time to interrupt the bullet camera and return to player camera.<br/><br/>

Warning: During campaign, bullet camera may stutter.
"]];
};
case "bulletcamon":{[] call BRG_BulletCamOn};
case "bulletcamoff":{[] call BRG_BulletCamOff};
};
36 changes: 36 additions & 0 deletions CheatDiary/Options/BulletTracing.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
if (isNil "BRG_TraceBullets_init") then {
BRG_TraceBullets_init = true;

BRG_TraceBullets = {
[player, 0] spawn BIS_fnc_traceBullets;
[player, _this] spawn BIS_fnc_traceBullets;
hint format ['Tracing the last %1 bullets at a time',_this];
PUB_PN = name player;publicVariable "PUB_PN";format ["%1 uses BulletTracing", PUB_PN] remoteExec ["systemChat"];
};
};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Bullet Tracing", "
Choose the amount of bullets you want traced: <br/>
<font color='#CC0000'><execute expression = '0 spawn BRG_TraceBullets'>Off</execute></font color>
<font color='#33CC33'><execute expression = '1 spawn BRG_TraceBullets'>1</execute></font color>
<font color='#33CC33'><execute expression = '5 spawn BRG_TraceBullets'>5</execute></font color>
<font color='#33CC33'><execute expression = '10 spawn BRG_TraceBullets'>10</execute></font color>
<font color='#33CC33'><execute expression = '30 spawn BRG_TraceBullets'>30</execute></font color>
<font color='#33CC33'><execute expression = '50 spawn BRG_TraceBullets'>50</execute></font color>
<font color='#33CC33'><execute expression = '100 spawn BRG_TraceBullets'>100</execute></font color><br/><br/>
NOTE: Currently works only for player in a single instance. This is a limitation of an Arma 3 function, not SSPCM.<br/>
WARNING: Tracing large amounts of bullets may cause performance issues.
"]];
};
default {
if (typeName _this == "SCALAR") then {
_this spawn BRG_TraceBullets;
};
};
};




32 changes: 32 additions & 0 deletions CheatDiary/Options/Debug.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
if (isNil "BRG_Debug_init") then {
BRG_Debug_init = true;

BRG_debStatus = false;//prevents multiple action menu entries
BRG_DebugOpenInMap = {
(finddisplay 12) createdisplay 'RscDisplayDebugPublic';
PUB_PN = name player;publicVariable "PUB_PN";format ["%1 uses Console", PUB_PN] remoteExec ["systemChat"];
};

BRG_DebugOn = {
if (!BRG_debStatus) then {
BRG_debStatus = true;
BRG_DebugactID = player addAction ["Debug Console", "(finddisplay 46) createdisplay 'RscDisplayDebugPublic';"];
};
hint 'Debug Console action menu ENABLED';
};

BRG_DebugOff = {
BRG_debStatus = false;
player removeAction BRG_DebugactID;
hint 'Debug Console action menu DISABLED';
};
};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Debug Console", "Debug Console <font color='#33CC33'><execute expression = '[] call BRG_DebugOpenInMap'>Open</execute></font color> <font color='#33CC33'><execute expression = '[] call BRG_DebugOn'>Enabled</execute></font color> <font color='#CC0000'><execute expression = '[] call BRG_DebugOff'>Disabled</execute></font color>"]];
};
case "debug_open":{[] call BRG_DebugOpenInMap};
case "debug_enable":{[] call BRG_DebugOn};
case "debug_disable":{[] call BRG_DebugOff};
};
23 changes: 23 additions & 0 deletions CheatDiary/Options/Fatigue.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
if (isNil "BRG_Fatigue_init") then {
BRG_Fatigue_init = true;

BRG_FatigueOn = {
player enableFatigue true;
hint 'Player fatigue ENABLED';
PUB_PN = name player;publicVariable "PUB_PN";format ["%1 reenabled stamina", PUB_PN] remoteExec ["systemChat"];
};

BRG_FatigueOff = {
player enableFatigue false;
hint 'Player fatigue DISABLED';
PUB_PN = name player;publicVariable "PUB_PN";format ["%1 disabled stamina", PUB_PN] remoteExec ["systemChat"];
};
};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Fatigue", "Fatigue <font color='#CC0000'><execute expression = '[] call BRG_FatigueOn'>Enabled</execute></font color> <font color='#33CC33'><execute expression = '[] call BRG_FatigueOff'>Disabled</execute></font color>"]];
};
case "fatigueon":{[] call BRG_FatigueOn};
case "fatigueoff":{[] call BRG_FatigueOff};
};
39 changes: 39 additions & 0 deletions CheatDiary/Options/FlyingJet.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//TODO: Make aircraft selection dynamic to support any future addons or user mods.
//Currently bugged in Contact. Plane switching doesnt work well. Might be from Jet DLC and ejection seats.
if (isNil "BRG_SIJ_init") then {
BRG_SIJ_init = true;

BRG_SIJetAlt = 300;//default altitude
BRG_SIJ_WipeOut = "B_Plane_CAS_01_F";
BRG_SIJ_Neophron = "O_Plane_CAS_02_F";
BRG_SIJ_Buzzard_CAS = "I_Plane_Fighter_03_CAS_F";
BRG_SIJ_Buzzard_AA = "I_Plane_Fighter_03_AA_F";
};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Spawn in Jet",
"Spawn in a flying Jet. Choose a jet:<br/>
<font color='#0066FF'><execute expression = '[BRG_SIJetAlt,BRG_SIJ_WipeOut] call BRG_fnc_spawnInJet'>A-164 WipeOut</execute></font color><br/>
<font color='#FF0000'><execute expression = '[BRG_SIJetAlt,BRG_SIJ_Neophron] call BRG_fnc_spawnInJet'>To-199 Neophron</execute></font color> <br/>
<font color='#009900'><execute expression = '[BRG_SIJetAlt,BRG_SIJ_Buzzard_CAS] call BRG_fnc_spawnInJet'>A-143 Buzzard CAS</execute></font color> <br/>
<font color='#009900'><execute expression = '[BRG_SIJetAlt,BRG_SIJ_Buzzard_AA] call BRG_fnc_spawnInJet'>A-143 Buzzard AA</execute></font color> <br/>
Starting Altitude:<br/>
<font color='#33CC33'><execute expression = 'BRG_SIJetAlt = 100;'>100m</execute></font color> <br/>
<font color='#33CC33'><execute expression = 'BRG_SIJetAlt = 300;'>300m</execute></font color> <br/>
<font color='#33CC33'><execute expression = 'BRG_SIJetAlt = 500;'>500m</execute></font color><br/>
<font color='#33CC33'><execute expression = 'BRG_SIJetAlt = 1000;'>1000m</execute></font color><br/>
<font color='#33CC33'><execute expression = 'BRG_SIJetAlt = 2000;'>2000m</execute></font color><br/>

"]];
};
case"wipeout":{[BRG_SIJetAlt,BRG_SIJ_WipeOut] call BRG_fnc_spawnInJet};
case"neophron":{[BRG_SIJetAlt,BRG_SIJ_Neophron] call BRG_fnc_spawnInJet};
case"buzzardcas":{[BRG_SIJetAlt,BRG_SIJ_Buzzard_CAS] call BRG_fnc_spawnInJet};
case"buzzardaa":{[BRG_SIJetAlt,BRG_SIJ_Buzzard_AA] call BRG_fnc_spawnInJet};
default{
if (typeName _this == "SCALAR") then {
BRG_SIJetAlt = _this;
};
};
};
31 changes: 31 additions & 0 deletions CheatDiary/Options/InfAmmo.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
if (isNil "BRG_InfAmmo_init") then {
BRG_InfAmmo_init = true;

BRG_InfAmmo = false;//prevents multiple eventhandler entries
BRG_InfAmmoOn = {
if (!BRG_InfAmmo) then {
BRG_InfAmmo = true;
BRG_InfAmmoID = player addeventhandler ["fired", {(_this select 0) setvehicleammo 1}];
};
hint 'Infinite ammo ENABLED';
PUB_PN = name player;publicVariable "PUB_PN";format ["%1 uses InfiniteAmmo", PUB_PN] remoteExec ["systemChat"];
};

BRG_InfAmmoOff = {
BRG_InfAmmo = false; player removeEventHandler ["fired", BRG_InfAmmoID];
hint 'Infinite ammo DISABLED';
};
};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Infinite Ammo", "Infinite Ammo <font color='#33CC33'><execute expression = '[] call BRG_InfAmmoOn'>Enabled</execute></font color> <font color='#CC0000'><execute expression = '[] call BRG_InfAmmoOff'>Disabled</execute></font color><br/>
NOTICE: Currently this feature works with handguns and primary weapons only. This is due behaviour of an Arma 3 command. This might be fixed in a future mod update."]];
};
case "InfAmmoOn":{[] call BRG_InfAmmoOn};
case "InfAmmoOff":{[] call BRG_InfAmmoOff};

};



20 changes: 20 additions & 0 deletions CheatDiary/Options/Info.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
BRG_LinkBISForum = {["Click: <a href='http://forums.bistudio.com/showthread.php?190017-Simple-Single-Player-Cheat-Menu'>http://forums.bistudio.com/showthread.php?190017-Simple-Single-Player-Cheat-Menu</a>","Bohemia Interactive Forum page", False, True] spawn BIS_fnc_guiMessage;};
BRG_LinkArmaholic = {["Click: <a href='http://www.armaholic.com/page.php?id=28400'>http://www.armaholic.com/page.php?id=28400</a>","Armaholic page", False, True] spawn BIS_fnc_guiMessage;};
BRG_LinkSteam = {["Click: <a href='http://steamcommunity.com/sharedfiles/filedetails/?id=410206202'>http://steamcommunity.com/sharedfiles/filedetails/?id=410206202</a>","Steam Workshop page", False, True] spawn BIS_fnc_guiMessage;};
BRG_LinkPW6 = {["Click: <a href='http://play.withsix.com/arma-3/mods/nFbxvKMmfkissfP66MhBBA/Simple-Single-Player-Cheat-Menu'>http://play.withsix.com/arma-3/mods/nFbxvKMmfkissfP66MhBBA/Simple-Single-Player-Cheat-Menu</a>","Play With Six Page", False, True] spawn BIS_fnc_guiMessage;};
BRG_LinkMyWiki = {["Click: <a href='http://wiki.benargee.com/Simple_Single_Player_Cheat_Menu'>http://wiki.benargee.com/Simple_Single_Player_Cheat_Menu</a>","My Wiki Page", False, True] spawn BIS_fnc_guiMessage;};
BRG_LinkArmaCheats = {["Click: <a href='https://community.bistudio.com/wiki/ArmA:_Cheats'>https://community.bistudio.com/wiki/ArmA:_Cheats</a>","My Wiki Page", False, True] spawn BIS_fnc_guiMessage;};

switch (_this) do {
case "diary":{
player createDiaryRecord ["BRG_CheatMenu", ["Information",("
SSPCM v" + (gettext (configfile >> "CfgPatches" >> "SSPCM" >> "versionStr")) +"<br/>
<font color='#3399FF'><execute expression = '[] call BRG_LinkBISForum'>Bohemia Interactive Forum page</execute></font color><br/>
<font color='#3399FF'><execute expression = '[] call BRG_LinkArmaholic'>Armaholic page</execute></font color><br/>
<font color='#3399FF'><execute expression = '[] call BRG_LinkSteam'>Steam Workshop page</execute></font color><br/>
<font color='#3399FF'><execute expression = '[] call BRG_LinkPW6'>Play With Six Page</execute></font color><br/>
<font color='#3399FF'><execute expression = '[] call BRG_LinkMyWiki'>My Wiki Page</execute></font color><br/>
<font color='#3399FF'><execute expression = '[] call BRG_LinkArmaCheats'>Standard Arma 3 cheats</execute></font color><br/>
")]];
};
};
Loading