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
<?php | |
var_dump(get_defined_vars()); |
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
using ICities; | |
using System; | |
using System.Linq; | |
using System.Reflection; | |
namespace SelfDestructor | |
{ | |
public static class SelfDestruct | |
{ | |
private static bool SelfDestructExecuted = false; |
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
RegisterNetEvent("Teleport") | |
AddEventHandler("Teleport", function(x, y, z) | |
x, y, z = tonumber(x), tonumber(y), tonumber(z) | |
local player = GetPlayerPed() | |
-- Fucking floats. | |
x = 0.0 + x | |
y = 0.0 + y | |
z = 0.0 + z |
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
public class BoolToAnyConverter : IValueConverter | |
{ | |
public object TrueValue { get; set; } | |
public object FalseValue { get; set; } | |
public object Convert(object value, Type targetType, object parameter, string language) | |
{ | |
return (bool)value ? TrueValue : FalseValue; | |
} |
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
const BrowserLoadTime = 1000; | |
class CefHelper { | |
public static eventHandlers: { [key: string]: (args: any[]) => void } = {}; | |
public get IsOpen() { return this._isOpen; } | |
private _browserControl: GTANetwork.GUI.Browser; | |
private _pagePath: string; | |
private _isCreated = false; |
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
public interface ILogger | |
{ | |
void Write(string message, LogMessageSeverity severity = LogMessageSeverity.Info); | |
void Write(object message, LogMessageSeverity severity = LogMessageSeverity.Info); | |
void Write(Exception exception, LogMessageSeverity severity = LogMessageSeverity.Error); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using ProtoBuf; | |
namespace TestConsoleApp | |
{ | |
[ProtoContract] | |
public class TestClass | |
{ |
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
class EventDispatcher { | |
public static eventHandlers: { [key: string]: (args: any[]) => void } = {}; | |
constructor() { | |
API.onServerEventTrigger.connect(<any>this.onEventTrigger); | |
} | |
private onEventTrigger = (eventName: string, args: System.Array<any>) => { | |
var argsArray: any[] = []; |
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
public class Program | |
{ | |
[STAThread] | |
public static void Main() | |
{ | |
AppDomain.CurrentDomain.AssemblyResolve += OnResolveAssembly; | |
App.Main(); | |
} | |
private static Assembly OnResolveAssembly(object sender, ResolveEventArgs args) |
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
[Serializable] | |
public class TypedHubClientInterceptor : IInterceptor | |
{ | |
public delegate void MethodCalledHandler(MethodInfo methodInfo, params object[] args); | |
public void Intercept(IInvocation invocation) => | |
MethodCalled?.Invoke(invocation.Method, invocation.Arguments); | |
public event MethodCalledHandler MethodCalled; | |
} |
OlderNewer