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
import * as alt from 'alt-client'; | |
import * as natives from 'natives'; | |
class AsyncModel { | |
constructor() { | |
this.loadingModels = new Set(); | |
this.loadedModels = new Map(); | |
} | |
cancel(model) { | |
this.loadingModels.delete(model); | |
this.removeLoadedModel(model); |
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 AltV.Net.Data; | |
using System; | |
using System.Collections.Generic; | |
using System.Net.Security; | |
using System.Security.Authentication; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using WebSocketSharp; | |
using WebSocketSharp.Server; |
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
// Small example, fetches the getInvincible from the client to see if the client is invincible or not. | |
// SERVER-SIDE | |
var response = await client.RequestDataFromClient( "IsPlayerInvincible" ); | |
if( response == null ) | |
Console.WriteLine( "Couldnt fetch" ); | |
else | |
Console.WriteLine( $"Player invincible: { response[ 0 ] }" ); |
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
$.ajax({ | |
type: "POST", | |
url: hostURL + "index.php", | |
data: { action: "something" } | |
}).done(function (data) { | |
console.log( data ); | |
}).fail(function (data) { | |
console.log(data); | |
}); |
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
function getSomething(somevalue) { | |
$.ajax({ | |
type: "GET", | |
url: "somedomain.com/someurl.php?somevar=1", | |
dataType: 'json' | |
}).done(function (data) { | |
console.log( data ); | |
}).fail(function (data) { | |
console.log( data ); | |
}); |
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 Database | |
{ | |
private | |
$database, | |
$dbhost = '', // usually localhost | |
$dbname = '', | |
$dbuser = '', | |
$dbpass = '' | |
; |
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
// By Niels Visbeek :: 30.08.2015 | |
#include <a_samp> | |
#include <streamer> | |
#define ELEVATOR_SPEED (5.0) | |
#define DOORS_SPEED (5.0) | |
#define ELEVATOR_WAIT_TIME (5000) | |
#define DIALOG_ID (9100) |
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
#if !defined S_MAX_TELEPORTS | |
#define S_MAX_TELEPORTS (50) | |
#endif | |
#if !defined S_MAX_TEL_NAME | |
#define S_MAX_TEL_NAME (24) | |
#endif | |
#if !defined S_MAX_CMD_NAME | |
#define S_MAX_CMD_NAME (32) |