12.11.2015, 23:23
I'd like to think it explains itself really. Below is an example, well more like an already drawn out cmd for you. But this should more or less do the job
Код HTML:
CMD:report(playerid) { if(!isnull(text)) { new string[128]; format(string, sizeof(string), "Report from %s: %s", PlayerNameEx(playerid), text); ABroadCast(COLOR_YELLOW,string,1); #if Report-Log new File:Reports; new day, month, year, minute, second, hour; gettime(hour,minute,second); getdate(year, month, day); Reports = fopen("logs/Reports.txt",io_append); format(string,sizeof(string),"[%02d/%02d/%02d %02d:%02d:%02d] Report from %s: %s\r\n",day, month, year,hour, minute, second,PlayerName(playerid),text); fwrite(Reports,string); fclose(Reports); print(string); #endif SendClientMessage(playerid, COLOR_YELLOW, "Your report was sent to the admin team:"); SendClientMessage(playerid, COLOR_YELLOW, text); PlayerMuteInfo[playerid][ReportCool] = 20; } else { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Report [Text]"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Please be specific in your report!"); } return 1; }