19.09.2014, 19:29
i have problem in cmd report , when i start server is say me unknown cmd , i use mysql R5
Logs server : http://pastebin.com/YTh4SVE4
pawn Код:
CMD:report(playerid, params[])
{
new message[128],admins=0;
if(sscanf(params, "s[128]", message)) return SCM(playerid, COLOR_GREY, SYNTAX_MESSAGE"/report [text]");
{
if(playerVariables[playerid][pRMuted] <= 0)
{
if(playerVariables[playerid][pDr] <= 0)
{
new query[128];
format(query,sizeof(query),"SELECT * FROM `reports`");
mysql_query(query);//
new reportss = mysql_num_rows();
if(reportss == 69) return SendClientMessage(playerid, COLOR_WHITE,"{FFFFCC}Error: There're too many unreaded reports.");
foreach(Player, i)
{
if(playerVariables[i][pAdminLevel] >= 1)
{
admins++;
}
}
if(admins == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: There are no admins online.");
new ya,ma,da,ha,mia,sa;
getdate(ya,ma,da);
gettime(ha,mia,sa);
new str[512];
mysql_format(handle,str,"INSERT INTO `reports` (`player`,`message`,`time`) VALUES ('%s','%s','%02d/%02d/%d %02d:%02d:%02d')",playerVariables[playerid][pNormalName],message,da,ma,ya,ha,mia,sa);
mysql_query(str);
SendClientMessage(playerid, 0xFFFFFFFF, "{F3FF02}Your Report Message was sent to the Admins");
format(str, sizeof(str), "Report from %s [%d]: %s.",playerVariables[playerid][pNormalName],playerid, message);
submitToHelpersAndAdmins(str,COLOR_FRED);
playerVariables[playerid][pDr] = 60;
}
else
{
SCM(playerid,-1,"Poti da un report o data la un minut.");
}
}
else SCM(playerid,-1,"You are muted from /report.");
}
return 1;
}
Код:
mysql_format