Skip to content

Instantly share code, notes, and snippets.

@KiloSwiss
KiloSwiss / FizzBuzz.sqf
Last active November 4, 2022 19:45
Various examples of solutions to the infamous FizzBuzz test.
/* Arma3 SQF syntax - FizzBuzz examples */
// Example 1a
for "_i" from 1 to 100 /* step 1 */ do
{
private _string = "";
if ( _i%3 isEqualTo 0 ) then { _string = "Fizz" };
if ( _i%5 isEqualTo 0 ) then { _string = _string + "Buzz" };
if ( _string isEqualTo "" ) then { _string = str _i };
diag_log _string;
@KiloSwiss
KiloSwiss / swapCarHorn.sqf
Created December 23, 2019 14:23
Swap the car horn of any vehicle (must be type "Car") with any other existing one.
// How to use when in a vehicle:
// [vehicle player, "PoliceHorn"] call KS_fnc_swapCarHorn;
//
// Possible Horns to select from (Note: "BikeHorn" doesn't make any sound):
// ["BikeHorn","CarHorn","TruckHorn","TruckHorn2","TruckHorn3","SportCarHorn","MiniCarHorn","AmbulanceHorn","PoliceHorn"]
//
// Returns "true" or "false".
KS_fnc_swapCarHorn =
{
@KiloSwiss
KiloSwiss / Autoexec.cfg
Last active October 13, 2023 20:57
Counter-Strike Global Offensive Configs
// CS:GO autoexec.cfg by KiloSwiss - Last Update: July/31/2020
// Download from Github: https://gist.github.com/KiloSwiss/a015b0620284ce74b5ed849ec599e51e
// This config is not meant to be used "out of the box", but to look up commands, ConVars and binds and to help you create your own personalized config.
// If you look for an easier way to create your own config or want to copy pro players settings, check out this Map by crashz' and MisterIO:
// https://steamcommunity.com/workshop/filedetails/?id=1325659427
// Feel free to edit this file, share the link with your friends, copy parts of it into your own config or even make your own config based on it.
// I recommend that you use a text editor like "Notepad++" or "Sublime" to edit this file.
// https://notepad-plus-plus.org/
// https://www.sublimetext.com/