Posts: 140
Threads: 49
Joined: Jul 2008
Reputation:
0
Is there something I can add to my script so that whenever an admin does a certain command it saves it to a file with the name and date?. So if an admin did /setmoney 100 it would log something like:
01/01/09 - Admin_Name - /setmoney name 100
etc
Posts: 1,293
Threads: 6
Joined: Jul 2008
Reputation:
0
The script I sent you records every command an admin makes. If you want it for specific commands, just use the SaveStuff line elsewhere.
As long as it contains the playerid and command text, it will save the command they use.
Posts: 149
Threads: 5
Joined: Apr 2007
Reputation:
0
@DrDeath - you were probably using an admin system which doesn't use rcon login but its own login, therefore IsPlayerAdmin would not tell the gamemode that you were an admin and wouldn't log it...
@meegan1 - that's just a loose indentation warning, you need to get the ifs and elses and whatnot to line up, it won't actually have an effect on the functionality of the code though.
Posts: 23
Threads: 1
Joined: May 2009
Reputation:
0
Yes, it's an admin script based in the script. I go to the filterscript and do admin=1337 or admin=4 etc. Only I know the rcon password. But how can I get it to recognize the admin system thats in the script.
Perhaps make it recognize something like if admin= >0 then save
Edit: I tried it with loggin in to rcon and then it works. But I would like to have it working without rcon admin
Posts: 149
Threads: 5
Joined: Apr 2007
Reputation:
0
Don't know 100% what you're asking but if I understand correctly then there's no easy way you can do that. You would need to incorporate the admin system into your gamemode or access the adminlist file when players connect to your server to see if they are admins. You'd then have to assign a variable to them saying if they were admins or not and use this to ask it to log admin commands. Alternatively, you could manually enter your admins' names into your gamemode; so if PlayerName is the same as the admin name then log.