Send something to the server log? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Send something to the server log? (
/showthread.php?tid=122585)
Send something to the server log? -
Sal_Kings - 22.01.2010
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..
Re: Send something to the server log? -
pascallj - 22.01.2010
Yes, with the
print function will everything you'll place there sended to the console and also to the server log
Re: Send something to the server log? -
Sal_Kings - 22.01.2010
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?
Re: Send something to the server log? -
pascallj - 22.01.2010
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;
}
Re: Send something to the server log? -
KnooL - 22.01.2010
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.