Skip to content

Instantly share code, notes, and snippets.

View headswe's full-sized avatar
🏀
Building cool things

Sebastian Nygren headswe

🏀
Building cool things
View GitHub Profile
_prevFat = getFatigue player;
while{alive player} do {
_fat = getFatigue player;
_dfat = _fat - _prevfat;
if(_dfat < 0) then {
_unit setFatigue (_fat + _dfat/2);
};
_prevFat = getFatigue player;
uisleep 1;
};
@headswe
headswe / gist:44393ba6ccf4d3fd7aa2
Created November 19, 2015 13:53
Spawn building
params["_path","_pos","_dir"];
_createdObjects = [];
_objects = "isArray (_x >> 'position')" configClasses _path;
_multiplyMatrixFunc =
{
private ["_array1", "_array2", "_result"];
_array1 = _this select 0;
_array2 = _this select 1;
_result =
@headswe
headswe / repo.xml
Created November 20, 2015 19:52
New repo.xml
<?xml version="1.0"?>
<RepoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Test Name</Name>
<Attributes>
<item>
<key>
<string>BattleEye</string>
</key>
<value>
<string>0</string>
Pancakes ( 16 ish (hell naw))
2 Eggs
½ teaspoon salt
1 tablespoon suger
6 dl milk
almost 3 dl flour
2-3 tablespoons melted butter
1.
<RepoConfigInfo>
<Address>1tac.tks</Address>
<Name>Team One</Name>
<UserName></UserName>
<PassWord></PassWord>
</RepoConfigInfo>
_badmag = "";
_newmag = "";
{
if(!isplayer _x) then {
_numOfMags = {tolower _x == tolower _badmag} count magazines _x;
if(_numOfMags > 0) then {
_x removeMagazines _badmag;
_x addMagazine [_newmag,_numOfMags];
};
he_deploy_chute = {
private ["_chute","_dir"];
_unit = _this select 0;
_unit setCaptive 1;
_unit allowdamage false;
waitUntil {(position _unit select 2) <= 500};
if (vehicle _unit != _unit) exitWith {};
_chute = createVehicle ["Steerable_Parachute_F", position _unit, [], direction _unit, 'FLY'];
_chute setPos (getPos _unit);
_unit assignAsDriver _chute;
#include "debug_console.hpp"
conClear();
_items = [];
#define TAB 9
#define BACKWARDSLASH 92
#define QUOTE 34
outlines = [];
#define PushbackLine(msg) outlines pushBack msg
he_fnc_makeMarker = {
if(!isServer) exitWith {};
params ["_pos","_text","_color","_icon"];
_veh = "Helper_Base_F" createVehicle _pos;
_veh setPosATL _pos;
_veh setVariable ["Text",_text,true];
if(!isNil "_color") then {_veh setVariable ["Color",_color]};
if(!isNil "_icon") then {_veh setVariable ["Icon",Icon]};
[_veh,[],true] remoteExec ["TMF_spectator_fnc_objectiveModule",0,true];
};
he_cas = {
params ["_pos","_dir"];
_dummy = "LaserTargetCBase" createVehicle _pos;
_dummy enableSimulationGlobal false; _dummy hideObjectGlobal true;
_dummy setVariable ["vehicle","a10classname"];
_dummy setVariable ["type",0];
_dummy setDir _dir;
[_dummy,nil,true] call BIS_fnc_moduleCAS;