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
stock GetTickDiff(newtick, oldtick) | |
{ | |
if (oldtick > newtick) { | |
return (cellmax - oldtick + 1) - (cellmin - newtick); | |
} | |
return newtick - oldtick; | |
} |
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
#include <iostream> | |
#include <fstream> | |
#include "main.h" | |
int main(int argc, char *argv[]) | |
{ | |
if (argc < 2) { | |
std::cout << "Usage: " << argv[0] << " file_name" << std::endl; | |
return 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
stock ProxDetector(playerid, Float:max_range, color, const string[], Float:max_ratio = 1.6) | |
{ | |
new | |
Float:pos_x, | |
Float:pos_y, | |
Float:pos_z, | |
Float:range, | |
Float:range_ratio, | |
Float:range_with_ratio, | |
clr_r, clr_g, clr_b, |
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
# color aliases | |
alias sudo='sudo ' | |
alias ls='ls --color=always' | |
alias dmesg='dmesg --color=always' | |
alias grep='grep --color=always' | |
alias gcc='gcc -fdiagnostics-color=always' | |
alias pacman='pacman --color=always' | |
alias dir='dir --color=always' | |
alias diff='diff --color=always' |
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
Element.prototype.parents = function(selector) { | |
var elements = []; | |
var elem = this; | |
var ishaveselector = selector !== undefined; | |
while ((elem = elem.parentElement) !== null) { | |
if (elem.nodeType !== Node.ELEMENT_NODE) { | |
continue; | |
} | |
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
/* | |
About: mysql orm register system | |
Author: ziggi | |
*/ | |
#include <a_samp> | |
#include "a_mysql" |
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
stock Float:frandom(Float:max) | |
{ | |
return floatdiv(float(random(0)), floatdiv(float(cellmax), max)); | |
} |
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
stock rgba2bgra(color) | |
{ | |
return | |
(color & 0xFF) | |
| ((color & 0xFF00) << 16) | |
| (color & 0xFF0000) | |
| ((color >> 16) & 0xFF00); | |
} |
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 IS_IN_RANGE | |
#define IS_IN_RANGE(%0,%1,%2) (((%0) - ((%1) + cellmin)) < (((%2) + 1) - ((%1) + cellmin))) | |
#endif | |
stock IsIpAddress(const string[]) | |
{ | |
new | |
octet, | |
j = 100; |
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 | |
include "SampQueryAPI.php"; | |
$query = new SampQueryAPI('127.0.0.1', '7777'); | |
if ($query->isOnline()) { | |
$aInformation = $query->getInfo(); | |
$aServerRules = $query->getRules(); | |
NewerOlder