03.12.2013, 23:49
So below is my /report command, I've been trying to fix it cause you needed and ID to report someone so now that i removed the ID it send out everything perfect exept the reportext, It sends a y with an accent
Код:
CMD:report(playerid, params[]) { new reporttext[128]; if(sscanf(params, "us[64]", reporttext)) return Syntax(playerid, "report", "[reporttext]."); if(strlen(reporttext) > 64) return Error(playerid, "Your report text cannot be more than 64 characters"); if(PlayerInfo[playerid][pRMuted]) return Error(playerid, "You are currently muted from the reports system. Report not sent."); if(GetPlayerActiveReport(playerid)) return Error(playerid, "You already have an active report. Please wait until it is closed out to re-report."); new reportid = GetNewReportID(); if(reportid == INVALID_REPORT_ID) return Error(playerid, "There are currently too many reports in the system. Please try again in a few minutes."); new q[256]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, 24); new time = gettime(); format(q, 256, "INSERT INTO reports (`reporter`, reporttext`, `time`, `accepted`, `resolved`, `rtime`) VALUES ('%s', '%s', %d, %d, %d, %d)", name, reporttext, time, 0, 0, 0); new string[128]; format(STRING, "[RID: %d] Report from %s [%d] : %s", reportid, GetPlayerNameEx(playerid), playerid, reporttext); SendAdminMessage(COLOR_ADMIN, string); SendAdminText(); print(string); format(STRING, "Your report has been sent to the admins. Please be paitient and wait until an admin can help you."); Message(playerid, string); Reports[reportid][rep_reporter] = playerid; Reports[reportid][rep_text] = reporttext; Reports[reportid][rep_time] = time; Reports[reportid][rep_accepted] = 0; return 1; }