#include <a_samp>
#include <zcmd>
new File:bugs;
#define DIALOG_BUGS 2008
#define COLOR_YELLOW 0xFFFF00AA // Server Message & Numbers & Names
#define C_White "{FFFFFF}" //Text
CMD:bug(playerid,params[])
{
new string[192], name[MAX_PLAYER_NAME];
if(isnull(params))
{
SendClientMessage(playerid, COLOR_YELLOW, "Usage: "C_White"/bug [Description of the bug]");
return 1;
}
GetPlayerName(playerid, name, sizeof(name));
bugs = fopen("Bugs.txt", io_append);
format(string,sizeof(string),"Reporter: %s | Bug:%s\r\n", name, params);
fwrite(bugs, string);
fclose(bugs);
SendClientMessage(playerid, COLOR_YELLOW, "Server: "C_White"Your bug report sent.");
return 1;
}
CMD:bugreports(playerid, params[])
{
new str[500];
bugs = fopen("Reported_Bugs.txt", io_read);
while(fread(bugs, str, sizeof str, false))
{
ShowPlayerDialog(playerid, DIALOG_BUGS, DIALOG_STYLE_MSGBOX, "Bug Reports", str, "Close", "");
}
fclose(bugs);
return 1;
}
//Y_INI Version
#include <a_samp>
#include <zcmd>
#include <YSI\y_ini>
CMD:bug(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /bug [Description of the bug]");
BugLog("Bugs.ini", params);
SendClientMessage(playerid, -1, "Server: Bug report sent.");
return 1;
}
CMD:bugreports(playerid, params[])
{
return 1;
}
stock BugLog(file[] , text[])
{
new File:Bugs=fopen(file,io_append);
fwrite(Bugs,text);
fwrite(Bugs,"\r\n");
fclose(Bugs);
return 1;
}
CMD:bugreports(playerid, params[])
{
new str[500], str2[500];
bugs = fopen("Reported_Bugs.txt", io_read);
while(fread(bugs, str, sizeof str, false))
{
format(str, sizeof(str), "%s%s", str2, str);
}
fclose(bugs);
ShowPlayerDialog(playerid, DIALOG_BUGS, DIALOG_STYLE_MSGBOX, "Bug Reports", str, "Close", "");
return 1;
}
C:\Documents and Settings\****\Desktop\NR DM\filterscripts\Bugs.PWN(32) : warning 213: tag mismatch
CMD:bugreports(playerid, params[])
{
new str[500];
bugs = fopen("Reported_Bugs.txt", io_read);
while(fread(bugs, str, sizeof str, false))
{
format(str, sizeof str, "%s%s", str, bugs);// Warning on this line!!
}
fclose(bugs);
ShowPlayerDialog(playerid, DIALOG_BUGS, DIALOG_STYLE_MSGBOX, "Bug Reports", str, "Close", "");
return 1;
}
CMD:bugreports(playerid, params[])
{
new str[500], str2[500];
bugs = fopen("Reported_Bugs.txt", io_read);
while(fread(bugs, str, sizeof str, false))
{
format(str2, sizeof(str2), "%s%s", str2, str);
}
fclose(bugs);
ShowPlayerDialog(playerid, DIALOG_BUGS, DIALOG_STYLE_MSGBOX, "Bug Reports", str2, "Close", "");
return 1;
}
CMD:bugreports(playerid, params[]) { new str[500]; bugs = fopen("Reported_Bugs.txt", io_read); while(fread(bugs, str, sizeof str, false)) { format(str, sizeof str, "%s%s\n", str, str);// Warning on this line!! } fclose(bugs); ShowPlayerDialog(playerid, DIALOG_BUGS, DIALOG_STYLE_MSGBOX, "Bug Reports", str, "Close", ""); return 1; }
Код:
CMD:bugreports(playerid, params[]) { new str[500]; bugs = fopen("Reported_Bugs.txt", io_read); while(fread(bugs, str, sizeof str, false)) { format(str, sizeof str, "%s%s\n", str, str);// Warning on this line!! } fclose(bugs); ShowPlayerDialog(playerid, DIALOG_BUGS, DIALOG_STYLE_MSGBOX, "Bug Reports", str, "Close", ""); return 1; } |