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
CMD:id(playerid, params[]) | |
{ | |
#if !defined COMMAND_ID_MAX_MATCHES | |
#define COMMAND_ID_MAX_MATCHES 10 | |
#endif | |
new | |
ids[COMMAND_ID_MAX_MATCHES]; | |
if (sscanf(params, "?<MATCH_NAME_PARTIAL=1>u[" #COMMAND_ID_MAX_MATCHES "]", ids)) { |
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 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
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
/* | |
About: GetVehicleParamsCarDoors fix (beta) | |
Author: ziggi | |
*/ | |
#if !defined _samp_included | |
#error Include a_samp.inc first | |
#endif |
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> | |
/* | |
Consts | |
*/ | |
#define TESTING_STRING " oc, ococ,ococ,ococ,oc oc,ococ,ococ,ococ,ococ,ococ,oco" | |
#define RESULT_STRING "oc,ococ,ococ,ococ,ococ,ococ,ococ,ococ,ococ,ococ,oco" | |
const PROFILE_ITERATIONS_MAJOR = 1000; |
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
# 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
stock Float:floatsuperround(Float:value, count) | |
{ | |
new | |
Float:intpart = float(floatround(value, floatround_tozero)), | |
Float:fractpart = floatfract(value) * float(pow(10, floatfractlength(value))); | |
return intpart + fractpart / float(pow(10, count)); | |
} | |
stock pow(value, degree) |
NewerOlder