This file contains hidden or 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
/* | |
SA:MP OOP include | |
Copyright (c) BJIADOKC | |
*/ | |
#if defined _oop_included | |
#endinput | |
#endif | |
#define _oop_included |
This file contains hidden or 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
/* | |
Функция для вырезания символов из строки | |
chrdel(string[], character, repeating) | |
Аргументы: | |
string[] - строка назначения | |
character - символ, который нужно вырезать |
This file contains hidden or 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
/* | |
Функция для вырезания подстроки из строки назначения | |
strsubdel(string[], const sub[], bool:sensetive = true, bool:repeating = true) | |
Аргументы: | |
string[] - строка обработки (назначения) | |
sub[] - подстрока, или то что нужно вырезать |
This file contains hidden or 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
cutAlphaRGBA(rgbacolor) return (rgbacolor >>> 8); // вернет цвет с вырезанной прозрачностью | |
cutAlphaARGB(argbcolor) return (argbcolor & 0xFFFFFF); | |
setAlphaRGBA(rgbacolor, alpha = 0xFF) return (cutAlphaRGBA(rgbacolor) | alpha); // вернет цвет с установленной прозрачностью | |
setAlphaARGB(argbcolor, alpha = 0xFF) return (cutAlphaARGB(argbcolor) | (alpha << 24)); | |
getAlphaRGBA(rgbacolor) return (rgbacolor & 0xFF); // вернет альфу | |
getAlphaARGB(argbcolor) return (argbcolor >>> 24); | |
bool:hasAlphaRGBA(rgbacolor) return (getAlphaRGBA(rgbacolor) != 0 && ((rgbacolor >>> 24) != 0)); | |
bool:hasAlphaARGB(argbcolor) return (getAlphaARGB(argbcolor) != 0 && ((argbcolor >>> 8) != 0)); | |
torgba(rgbacolor, &r, &g, &b, &a) // разобьет цвет на состовляющие (red, green, blue, alpha) |
This file contains hidden or 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 Jenkins_Hash(string[]) | |
{ | |
new hash; | |
for(new i; string[i]; i++) | |
{ | |
hash += string[i]; | |
hash += (hash << 10); | |
hash ^= (hash >> 6); | |
} |
This file contains hidden or 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
/* | |
Функция для получения хеш-суммы строки | |
B_Hash(source[], dest[], bool:lowcase = true); | |
Аргументы: | |
source[] - строка, хеш-сумму которой нужно получить | |
dest[] - строка, куда будет помещена хеш-сумма (96 символов) |