how ti get a print in when a commend is used. - 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)
+--- Thread: how ti get a print in when a commend is used. (
/showthread.php?tid=428038)
how ti get a print in when a commend is used. -
RiChArD_A - 04.04.2013
Hi, what can i do ti get print in samp-server.exe every time someone uses i command. Something like this: ****** has used the command: /killme. Thank you.
Re: how ti get a print in when a commend is used. -
SilverKiller - 04.04.2013
Use printf.
Re: how ti get a print in when a commend is used. -
RajatPawar - 04.04.2013
pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[], success )
{
if(success) printf("ID %d used a command - %s.", playerid, cmdtext);
return 1;
}
Re: how ti get a print in when a commend is used. -
RiChArD_A - 04.04.2013
Quote:
Originally Posted by Rajat_Pawar
pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[], success ) { if(success) printf("ID %d used a command - %s.", playerid, cmdtext); return 1; }
|
Thank you!
PD: Hi Silv!
EDIT:
Look I got this:
Код:
.pwn(1143) : error 025: function heading differs from prototype
Error Line:
pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[], success )
Re: how ti get a print in when a commend is used. -
RajatPawar - 06.04.2013
Quote:
Originally Posted by RiChArD_A
Thank you!
PD: Hi Silv!
EDIT:
Look I got this:
Код:
.pwn(1143) : error 025: function heading differs from prototype
Error Line:
pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[], success )
|
Well, it's too late, but anyways, it's supposed to be:
pawn Код:
OnPlayerCommandPerformed(playerid, cmdtext[], success)
Re: how ti get a print in when a commend is used. -
RiChArD_A - 08.04.2013
I'll try.