20.11.2017, 19:41
(
Последний раз редактировалось ShapeGaz; 21.11.2017 в 10:32.
)
MurmurHash3 for SA:MP
What is MurmurHash3?
MurmurHash3 is non-cryptographic hash function(GitHub).
And my plugin allow working with it.
Natives
PHP код:
native MurmurHash(const key[], len, seed);
Example #1 - Not random hash
Let's make a test hash. Create variable with your key string.
PHP код:
new key[] = "This is my test string";
PHP код:
printf("Hash: %d",MurmurHash(key,sizeof(key),0));
PHP код:
Hash: 733688637
Let's make a test random hash. Create variable with your key string.
PHP код:
new key[] = "This is my test string";
PHP код:
new randnumber = random(9999);
PHP код:
printf("Random hash: %d",MurmurHash(key,sizeof(key),randnumber));
1. Download MurmurHash3 from Releases page.
2. Extract MurmurHash3.inc to ./pawno/include folder.
3. In your gamemode include MurmurHash3.inc.
4. Extract MurmurHash3.dll or MurmurHash3.so in ./plugins folder.
5. In server.cfg on line "plugins" add MurmurHash3.dll or MurmurHash3.so
Download
Download for Windows
Download for Linux
Source code