09.06.2011, 15:37
I was doing some testing in my gamemode, and this command always worked before.
Now if i type /ooc [somethinglongerthenXchars] it says this in red.
As you can see i'm using ZCMD+sscanf (2.0)
Now if i type /ooc [somethinglongerthenXchars] it says this in red.
As you can see i'm using ZCMD+sscanf (2.0)
pawn Код:
COMMAND:ooc(playerid,params[])
{
new string[164];
if (!sscanf(params,"s[164]",string))
{
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),string);
format(log,sizeof(log),"[%s %d, %d, %d:%d:%d] %s: %s\r\n",month,d,y,hh,mm,ss,PlayerName(playerid),string);
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.");
}
else return SendClientMessage(playerid,-1,"USAGE: /gm [message]");
return 1;
}