09.06.2011, 17:21
Delete the code that you DON'T need.
pawn Код:
COMMAND:ooc(playerid,params[]) {
if(isnull(params))
return SendClientMessage(playerid, -1, "USAGE: /gm [message]");
if(pData[playerid][pMuted] != 1) {
new str[128];
new log[128];
new month[12];
new hh,mm,ss,y,m,d;
gettime(hh,mm,ss);
getdate(y,m,d);
format(month, 12, "%s", Months[m-1]);
format(str,sizeof(str),"OOC | %s: %s",PlayerName(playerid),params);
format(log,sizeof(log),"[%s %d, %d, %d:%d:%d] %s: %s\r\n",month,d,y,hh,mm,ss,PlayerName(playerid),params);
new File:lfile = fopen("TPRP/Logs/OOC-Chat.log",io_append);
fwrite(lfile,log);
fclose(lfile);
SendClientMessageToAll(COLOR_DARKSLATEGRAY,str);
}
else return SendClientMessage(playerid,COLOR_RED,"ERROR: You have been muted by Staff.");
return 1;
}