Your main issue is not knowing which variable type to use.
With your warning system when you're accessing %timeswarned[%target] it isn't saving after the function ends. You need to use a global variable to keep track like this.
$variable = "something";
Variables that start with a $ are global variables and can be used anywhere.
%variable = "else";
These are local, after the function ends they end.
Another thing I noticed is that sometimes you're using = when you should be doing ==. The first one is the assignment operator so whenever you run code inside your if loops it's just going to set those variables to true. You want == to check if they're equal.
With your item pickup announcements, you're calling serverCmdAdminChat which expects a client as a parameter instead of just a message. When you type "/ac hello" the server gets serverCmdAdminChat(%yourClient, "hello"); so if you wanted to use it you'd need a client to send that is an admin. I'd suggest just making your own message admin command.
Only other thing I'd suggest is adding some error checking with your commands to make sure the target.