how ti get a print in when a commend is used.
#1

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.
Reply
#2

Use printf.
Reply
#3

pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[], success )
{
   if(success) printf("ID %d used a command - %s.", playerid, cmdtext);
   return 1;
}
Reply
#4

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 )
Reply
#5

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)
Reply
#6

I'll try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)