#define FILTERSCRIPT
#include <a_samp>
#include <md5>
#include <sscanf2>
stock hashit(string[])
{
new salt = 100;
new hashed = MD5_Hash(MD5_Hash("salt"), MD5_Hash("%s"));
return hashed;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
printf("MD5 HASH TEST: %s", hashit("123456"));
print("--------------------------------------\n");
return 1;
}
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(8) : warning 202: number of arguments does not match definition C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(8) : error 033: array must be indexed (variable "-unknown-") C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(7) : warning 204: symbol is assigned a value that is never used: "rand" C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(5) : warning 203: symbol is never used: "string" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
stock hashit(string[])
{
new salt = 100;
new hashed = MD5_Hash(MD5_Hash("salt"), MD5_Hash("%s"));
return hashed;
}
C:\Users\FBI\Desktop\core\B_Register\filterscripts\test2.pwn(8) : error 033: array must be indexed (variable "-unknown-")
#include <a_samp>
native WP_Hash(buffer[], len, const str[]);
main()
{
new
buf[129];
printf("hash");
WP_Hash(buf, sizeof (buf), "The quick brown fox jumps over the lazy dog");
print(buf);
}
|
If you want my advice try to use this ... https://sampforum.blast.hk/showthread.php?tid=65290
Код:
#include <a_samp>
native WP_Hash(buffer[], len, const str[]);
main()
{
new
buf[129];
printf("hash");
WP_Hash(buf, sizeof (buf), "The quick brown fox jumps over the lazy dog");
print(buf);
}
|