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(); | |
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 <a_samp> | |
#define ORGANIZATION_MAX_NAME 32 | |
#define ORGANIZATION_MAX_RANK_NAME 32 | |
enum { | |
ORGANIZATION_NONE, | |
ORGANIZATION_LSPD, | |
ORGANIZATION_FBI, | |
ORGANIZATION_AVIA, |
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 GetCoordsBefore(Float:x, Float:y, Float:a, Float:distance, &Float:res_x, &Float:res_y) | |
{ | |
res_x = x + (distance * floatsin(-a, degrees)); | |
res_y = y + (distance * floatcos(-a, degrees)); | |
} |
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 ReturnRandomSymbol(bool:uppercase = true, bool:lowercase = true) | |
{ | |
new value = -1; | |
if (uppercase && lowercase) { | |
value = random(2); | |
} | |
if (uppercase && (value == 0 || value == -1)) { | |
value = mathrandom('A', '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
#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
enum WeekLang { | |
WEEK_LANG_ENGLISH, | |
WEEK_LANG_RUSSIAN, | |
} | |
static const | |
gDaysOfWeek[WeekLang][][] = { | |
{ | |
!"Thursday", | |
!"Friday", |
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 crop_string(const input_str[], output_str[], const length = 60, const size = sizeof(output_str)) | |
{ | |
new | |
buffer[1024], | |
i = 0, | |
j = 0; | |
while (input_str[i] != '\0') { | |
if (i % length == 0) { | |
buffer[j] = '\n'; |
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
<?php | |
inculde 'oop_config.php'; | |
echo Config::get()->site->path; | |
// result: some_path/ | |
$cfg = new Config; | |
echo $cfg->site->path; | |
// result: some_path/ |
NewerOlder