Send something to the server log?
#1

Is it possible to make a command like /text Hey, there was a hacker named Bob395.

Then on the server log there will be a message there was a hacker named Bob395..
Reply
#2

Yes, with the print function will everything you'll place there sended to the console and also to the server log
Reply
#3

Quote:
Originally Posted by pascallj
Yes, with the print function will everything you'll place there sended to the console and also to the server log
Код:
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		
    print("???");
		return 1;
	}
Ok, well I'm really nooby. How exactly do I do this?
Reply
#4

What do you exactly want?

An example of the Print function:

Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{	
print("You're text here.");
return 1;
}
Reply
#5

You can also make a notice to the server log (i'm not exactly pro in strcmp so i'm using dcmd with sscanf)
pawn Код:
dcmd_notice(playerid,params[])
{
  new string[128];
  if(sscanf(params,"s",string)) {
    SendClientMessage(playerid,COLOR,"[USAGE] /notice [text] (this will text something in the server log)");
  }
  else {
    printf("[PLAYER NOTICE] %s",string);
    SendClientMessage(playerid,COLOR,"[SUCCESFULL] You have successfully printed something into the servers log");
  }
  return 1;
}
Just for you to get the idea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)