28.02.2018, 21:43
[19:13] ThreeKingz: I think this is what you might be looking for:
[19:14] ThreeKingz:
https://github.com/ThreeKingz/BRW
Credits to ThePhenix
[19:14] ThreeKingz:
PHP код:
new buf[1024], source[128];
new BRW:handle = BRW::Open("Binary/foo.amx", bin_read);
new len = BRW::GetTotalBytes(handle);
while(BRW::GetCurrentBytes(handle) != len)
{
format(source, 128, "0x%08x, ", BRW::ReadInt32(handle));
strcat(buf, source);
}
BRW::Close(handle);
print(buf);
new data[] = {0x00000090, 0x0808F1E0, 0x00080004, 0x0000006C, 0x000000B0, 0x000000D4, 0x000040D4, 0xFFFFFFFF, 0x00000038, 0x00000040, 0x00000048, 0x00000048, 0x00000048, 0x00000048, 0x00000008, 0x0000004A, 0x00000000, 0x00000058, 0x6E4F001F, 0x6E6F6352, 0x6D6D6F43, 0x00646E61, 0x6C6C6143, 0x6F6D6552, 0x75466574, 0x6974636E, 0x00006E6F, 0x2E007880, 0x0C290981, 0x00271C27, 0x7B800C27, 0x30102C00, 0x5F804980, 0x43805280, 0x44804D80, 0x00738000};
handle = BRW::Open("Binary/testfoo.amx", bin_write);
for(new i = 0; i < sizeof(data); i++)
{
BRW::WriteInt32(handle, data[i]);
}
BRW::Close(handle);
Credits to ThePhenix