This will receive the the complaint or msg from players and write into the manuadminmod/log/complaint.log
Code :
$mod->registerCommand("comp", '~^comp \S.*$~i', "comp", $commands_basic);
public function comp($guid, $parameters)
{
$parameters = implode(" ", $parameters);
$this->players[$guid]->say("Complaint Registered");
$this->players[$guid]->say("Your Complaint is > ^0" . $parameters);
$timestamp = date("[d.m.y H:i:s]");
$h = fopen(LOGDIR . "/complaint.log", "a");
fwrite($h, $timestamp . " [" . $guid . "] : [" . $parameters . "] Complaint by [ " . $this->players[$guid]->getName() . " ]\n\n");
fclose($h);
}
1. Add the code to your manuadminmod/plugin/basiccommands.php
2. Add the "comp" in the manuadminmod/config/groups.cfg (add comp to all groups)
3. Add the a text file with name complaint to log folder and change its extension to .log (manuadminmod/log/complaint.log)
4. Type !comp yourmsg
Your Complaint will be find here (manuadminmod/log/complaint.log)
Thnaks
JinKazama* Game Ranger 3044420
You think you are better than me because you are programmer???
No I’m better than you because I have Brain :hide: