How can i save
#4

pawn Код:
stock OOCLog(string[])
{
  new buffer[128];
  format(buffer,sizeof(buffer), "%s\r\n",string);

  new File:hFile;
  hFile = fopen("OOC.log", io_append);

  fwrite(hFile,buffer);
  fclose(hFile);

  return 1;
}
and when you do a SendClientMessageToAll, you still need to call this function, a bit like this
pawn Код:
if (strcmp(cmdtext, "/all", true) == 0) // assume this is a command where SendClientMessageToAll is used
{
   new tmp[128];
   strmid(tmp, cmdtext, strfind(cmdtext, " "), strlen(tmp)); // get the message from the command string
   SendClientMessageToAll(COLOUR_MESSAGE, tmp); // sending the message
   OOCLog(tmp); // log it
}
Reply


Messages In This Thread
How can i save - by Scoots - 17.03.2009, 13:29
Re: How can i save - by MenaceX^ - 17.03.2009, 13:33
Re: How can i save - by Scoots - 17.03.2009, 13:42
Re: How can i save - by [RP]Rav - 17.03.2009, 14:10
Re: How can i save - by Scoots - 17.03.2009, 14:29

Forum Jump:


Users browsing this thread: 1 Guest(s)