05.04.2014, 11:40
(
Last edited by citromhun; 11/04/2014 at 09:57 AM.
)
Hi there!
Today I will explain what I have learned yet ano Pedro master. Now create a new tab and enter this line is 2.
a_samp: Fund must as without can not be converted.
zcmd: Due command.
Then create a command.
If you're so far to create a "output" and a "line" is.
Although do you have a file in the folder scriptfiles Eg help.txt
In this way you do that. Txt file to bring up. But now comes a layover you can not really understand. First I do not understand it easy.
In the meantime, read the open file as long as it is taken. (while) repeats until the result is non-zero reading (fread) set of files.
Now view the Dialog.
Thus, so the command is fully operational. But we are still not ready. Be alive to finish the order.
And we are ready. Now we test. Enter into a txt to file, for example:.. Many a letter "a".
Results.:
(Hungary contains letters)
Full code.:
Thank you for your attention! Further around a lot.
Today I will explain what I have learned yet ano Pedro master. Now create a new tab and enter this line is 2.
pawn Code:
#include <a_samp>
#include <zcmd>
zcmd: Due command.
Then create a command.
pawn Code:
CMD:help(playerid) {
pawn Code:
new output[2048], line[512];
output[0] = EOS;
pawn Code:
new File:tmp=fopen("commands/help.txt");
pawn Code:
if(tmp) {
while(fread(tmp, line, 512)) strins(output, line, strlen(output), sizeof(output));
fclose(tmp);
}
Now view the Dialog.
pawn Code:
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFFFF}Help", kimenet, "Ok", "");
pawn Code:
return 1;
}
Results.:
(Hungary contains letters)
Full code.:
pawn Code:
#include <a_samp>
#include <zcmd>
CMD:help(playerid) {
new output[2048], line[512];
output[0] = EOS;
new File:tmp=fopen("commands/help.txt");
if(tmp) {
while(fread(tmp, line, 512)) strins(output, line, strlen(output), sizeof(output));
fclose(tmp);
}
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "{FFFFFF}Help", output, "Ok", "[x]");
return 1;
}