[HELP]save hex code to file?
#4

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
new len,
    
input[256 2],
    
output[256];
    
input "C2000000E0F108080400080094000000E40000001401000014";
len strlen(input) / 2;
HexStringToString(input,output,sizeof(output)); //Return binary data: "В...ŕń......”...д........"
new File:outf fopen("test.bin",io_write);
for(new 
0leni++){
    
fputchar(outf,output[i],false);
}
fclose(outf); 
ADM:
https://sampforum.blast.hk/showthread.php?tid=595203
Thanx.

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
What is it for?
I have OnRconCommand in my gamemode. but in samp there is some bug, and it is working only in fs.
so i want to create .amx file (filterscript) that will comunicate with my gm and make OnRconCommand working.
then i will just load this fs by using command in my gm.

file i want create:
Код:
#include <a_samp>
public OnRconCommand(cmd[])
{
CallRemoteFunction("OnRconCmd","s",cmd);
return 1;
}
hex value u can see in this thread is from compiled .amx.

then i can just use this in my gm:
Код:
//to ongamemodeinit:
SendRconCommand(loadfs ../scriptfiles/fix);  //fix will be name of created file


public OnRconCmd(cmd[])
{
    return 1;
}
forward OnRconCmd(cmd[]);
+ create file.
Reply


Messages In This Thread
[HELP]save hex code to file? - by gouster3 - 26.08.2016, 05:31
Re: [HELP]save hex code to file? - by SickAttack - 26.08.2016, 05:52
Re: [HELP]save hex code to file? - by AbyssMorgan - 26.08.2016, 06:04
Re: [HELP]save hex code to file? - by gouster3 - 26.08.2016, 14:57
Re: [HELP]save hex code to file? - by Konstantinos - 26.08.2016, 15:01
Re: [HELP]save hex code to file? - by gouster3 - 26.08.2016, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)