Posts: 1,506
Threads: 69
Joined: Feb 2008
Quote:
Originally Posted by Calg00ne
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; }
|
It's almost the same amount of code, also i have my own style of coding which i suppose everybody has, and i'd not like to change it unless it's causing any problems.
How did my coding cause this message, and how did your edit fix it?
Thanks.