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
_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];
};
<RepoConfigInfo>
<Address>1tac.tks</Address>
<Name>Team One</Name>
<UserName></UserName>
<PassWord></PassWord>
</RepoConfigInfo>
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.
@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>
@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 =
_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;
};
#include "debug_console.hpp"
conClear();
_items = [];
#define TAB 9
#define BACKWARDSLASH 92
#define QUOTE 34
KK_fnc_insert = {
private ["_arr", "_i", "_res"];
_arr = _this select 0;
_i = _this select 2;
params ["_pos","_radius","_side];
{_pos distance2d _x < _radius && {side _x == _side}} count allunits
_getCluster = {
private ["_clusters","_checkedMen","_distanceMaX","_cluster","_unit"];
_clusters = [];
_checkedMen = [];
_distanceMaX = 35;
{
if(!(_x in _checkedMen)) then
{
_cluster = [_x];
_unit = _x;
@headswe
headswe / repo.xml
Last active February 13, 2016 10:37
<?xml version="1.0"?>
<AddonCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>YourName</Name>
<ServerAddress>MyGameServer.com</ServerAddress>
<ServerPort>1337</ServerPort>
<ServerPassword>MyPassword</ServerPassword>
<ForceBattleEye>False</ForceBattleEye>
</AddonCollection>