21.10.2018, 19:03
Thank you both! I have other question
How can I:
PHP код:
CMD:acceptreport(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid,-1,""COL_RED"Not Admin!");
new str[128], Cache:delrep, repid;
if(sscanf(params, "i", repid)) return SendClientMessage(playerid, -1, "Usage: /acceptreport [Report ID]");
mysql_format(handle, str, sizeof(str), "SELECT * FROM `reportlog` WHERE `ID` = '%d'", repid);
delrep = mysql_query(handle, str, true);
new count = cache_num_rows();
if(count > 0)
{
mysql_format(handle, str, sizeof(str), "DELETE FROM `reportlog` WHERE `ID` = '%d'", repid);
mysql_query(handle, str, false);
format(str, sizeof(str), "You have accepted the report ID: [#%d]", repid);
SendClientMessage(playerid, COLOR_YELLOW, str);
}
else return SendClientMessage(playerid, COLOR_YELLOW, "Report ID not valide!");
cache_delete(delrep);
return 1;
}
- Get the Username of the ID? ex PHP код:
You have accepted the report ID: %d from user: %s
- How can I SendClientMessage to targetid? (to the username who reported, doesn't matter if he is online or offline)