A question about printf & onplayercommandperfrom/text - 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: A question about printf & onplayercommandperfrom/text (
/showthread.php?tid=519373)
-Delete- -
Johnson_Brooks - 14.06.2014
delete
Re: A question about printf & onplayercommandperfrom/text -
SilentSoul - 14.06.2014
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
printf("%s(%d) has used %s",GetPlayerNameEx(playerid),playerid,cmdtext);
return 1;
}
EDIT: here's the stock of getplayernameex if you don't have it.
pawn Код:
stock GetPlayerNameEx(playerid)
{
new pName[25];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}