logging commands - 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: logging commands (
/showthread.php?tid=147681)
logging commands -
swredder - 13.05.2010
hello, today i added a command to log the commands a player uses evrything works fine but i got an npc in the server what uses a command and it spams the logs alot is there a way to not log it for npc's?
this is my script:
Код:
new name22[MAX_PLAYER_NAME];
new string22[128];
GetPlayerName(playerid,name22,sizeof(name22));
format(string22,sizeof(string22),"%s: %s",name22,cmdtext);
WriteLog(CMDL,string22);
part of my log:
Код:
[14:45] daXSZbitch: /npcanim
[14:45] daXSZbitch: /npcanim
[14:45] daXSZbitch: /npcanim
[14:46] daXSZbitch: /npcanim
[14:46] daXSZbitch: /npcanim
[14:46] daXSZbitch: /npcanim
[14:47] daXSZbitch: /npcanim
[14:47] daXSZbitch: /npcanim
[14:47] daXSZbitch: /npcanim
[14:48] daXSZbitch: /npcanim
[14:48] daXSZbitch: /npcanim
[14:49] Micka: /pcar
[14:49] daXSZbitch: /npcanim
[14:49] daXSZbitch: /npcanim
[14:50] daXSZbitch: /npcanim
[14:50] Micka: /flip
[14:51] daXSZbitch: /npcanim
[14:51] daXSZbitch: /npcanim
[14:52] daXSZbitch: /npcanim
[14:52] daXSZbitch: /npcanim
[14:52] daXSZbitch: /npcanim
[14:53] samerX: /gggg
[14:53] daXSZbitch: /npcanim
thanks in advance
Re: logging commands -
Killa_ - 13.05.2010
Код:
if(!IsPlayerNPC(playerid))
{
new name22[MAX_PLAYER_NAME];
new string22[128];
GetPlayerName(playerid,name22,sizeof(name22));
format(string22,sizeof(string22),"%s: %s",name22,cmdtext);
WriteLog(CMDL,string22);
}
Re: logging commands -
swredder - 13.05.2010
owyeah forgot about that function >.< it works now thanks alot!