did you try it with the non-static file names (on lines 31 and 5)? Would be nice if that would work now.
Beiträge von Yenz
-
-
DOWNLOAD HERE new file. (rev2)
Download revision 3please test again.
-
yeah, i'm a very very good guy
usual (attention) note: Not tested. No warranty. Use carefully.
installation:
put the "banip.php" into your plugin folderexplanation:
With "!banip <player_name|pid>" you write his ip into "plugins/banned_ips.lst" into your config file an ban him (rcon banClient pid).
Every time a player joined it will be checked if his ip is black-listed. If so, he will be banned again.if you edit banned_ips.lst manually you have to restart mam. plugin only read it once at startup.
Please let me know if this works. Maybe i should upload my plugins in the plugins section.
By the way: There is a section for plugin-requests: http://manuadminmod.de/forum/index.php?page=Board&boardID=46
Edit: bugfix -> r2
Edit: revision 3 uploaded -
ETA = unknown, it's done when it's done.
Maybe manu could say if this feature is being planned. I don't know. -
referring to this post (http://www.manuadminmod.de/forum/index.php?page=Thread&postID=15630#post15630 --- google-translate) this will be a feature in the next version of MAM. So maybe you will be a bit patient
-
Also bei mir gehen beide Seiten (Custom_Commands und Command-Aliasse)
-
Sadly, I have no knowledge about performance with mam. Sorry.
-
und da es hier um ein !say geht, kann man auch auf bereits existierende Befehle zurückgreifen:
-
if i put a sleep in there the complete MAM would sleep - very bad.
so you have to do that:
1.) delete the old plugin-file from you plugin-folder.
2.) add this line to your config at the [welcomemessages]-section:
e.g.:
Code[welcomemessages] enabled = 1 master = "^1ATTENTION: <GROUP_NAME> ^7<PLAYER_NAME>^1 has joined the game!" admin = "^1<GROUP_NAME> ^7<PLAYER_NAME>^1 has joined the game!" member = "^2Welcome <GROUP_NAME> ^7<PLAYER_NAME>^2" user = "^2Welcome <GROUP_NAME> ^7<PLAYER_NAME>^2" default = "^2Welcome <GROUP_NAME> ^7<PLAYER_NAME>" pm_message = "Please type !rules to read the rules of the server."
3.) REPLACE the content of the old welcomemessages.php file with this one:
PHP
Alles anzeigen<?php //Das Event registrieren $mod->registerEvent("playerJoined", "welcomemessages_send"); //Die Standart CVs setzen, falls sie nicht in der config.cfg gesetzt sind $mod->setDefaultCV("welcomemessages", "enabled", 0); $mod->setDefaultCV("welcomemessages", "time", 120); $mod->setDefaultCV("welcomemessages", "whisper", 0); //Hauptfunktion die aufgerufen wird, wenn ein Spieler joint; Argument: GUID des neuen Spielers function welcomemessages_send($guid) { global $players; global $mod; //Ist [welcomemessages]enabled = 1 if (!$mod->getCV("welcomemessages", "enabled")) { return false; } //Gruppe des neuen Spielers abrufen $group = $players[$guid]->getGroup(); //Existiert eine Welcomemessage für diese Gruppe? if ($mod->existsCV("welcomemessages", $group)) { //Führe die replaces in der Message durch $search = array( "<PLAYER_NAME>", "<GROUP_NAME>" ); $replace = array( $players[$guid]->getName(), $mod->getLongGroupName($group) ); //Sende die Message if ($mod->getCV("welcomemessages", "whisper")) { $players[$guid]->say(str_replace($search, $replace, $mod->getCV("welcomemessages", $group))); } else { $mod->rconSay(str_replace($search, $replace, $mod->getCV("welcomemessages", $group))); } } //Private Nachricht if ($mod->existsCV("welcomemessages", "pm_message")) { //Führe die replaces in der Message durch $search = array( "<PLAYER_NAME>", "<GROUP_NAME>" ); $replace = array( $players[$guid]->getName(), $mod->getLongGroupName($group) ); //Sende die Message $mod->rconSay(str_replace($search, $replace, $mod->getCV("welcomemessages", "pm_message"))); } } ?>
IMPORTANT: If manu will release a new version of his mod this plugin will be overwritten, so be careful.
Have Fun!
-
I think the easiest way is to disable welcome messages in config and only use that plugin.
PHP
Alles anzeigen<?php $mod->registerEvent("playerJoined", "second_Welcome_Message"); function second_Welcome_Message($guid) { global $players; global $mod; $welcome_message = "^2Welcome <GROUP_NAME> ^7<PLAYER_NAME>"; $rules_message = "Please type !rules to read the rules of the server."; $welcome_message = str_replace(<PLAYER_NAME>, $players[$guid]->getName(), $welcome_message); $welcome_message = str_replace(<GROUP_NAME>, $players[$guid]->getGroup(), $welcome_message); $mod->rconSay($welcome_message); $players[$guid]->say($rules_message); } ?>
But now you have only one kind of welcome message for all the groups. An Admin will be greeted on the same way as a default user will be.
If you want to have different kinds, I maybe could implement this, too.@Speed-Issues: I don't know why this is so slowly. I meant to read some time ago, that each rcon that will be executed by MAM takes one second.
-
also aptitude bietet die möglichkeit an pakete zu entfernen, du kannst du abhängigkeiten sehen, programme "vollständig" löschen, etc.
als root natürlich ausführen. -
yeah, then either you have an error in your previous post or the "fucking" manual isn't up to date. There is no <PLAYER_NAME>
Edit: Aaaah , i see
http://manuadminmod.de/index.php/Willkommensnachrichten. Pardon, manu
-
1.) I didn't know that something like this exists: <ARG:FIND_PLAYER:NAME>
2.) He wished, that !rules-message is PM.
Manu, what ist the difference between <PLAYER:NAME> and <PLAYER_NAME>. Is there a list with those aliases explained?
-
-
i think it would be the best thing if you would post in the plugin's topic. the author should/could help you. i don't know the only-plugin...
Go here: ONLY-PLugin
-
NOT TESTED!
[code=php]
<?php$mod->registerEvent("playerJoined", "second_Welcome_Message");
function second_Welcome_Message($guid) {
global $players;$players[$guid]->say("Please type !rules to read the rules of the server.");
}?>
[/PHP]and again: NOT TESTED!
[PHP]
<?php$mod->registerCommand("h", false, "say_hello");
function say_hello($guid, $parameters) {
global $players;
global $mod;
$player = implode(" ", $parameters);
$player_guid = $mod->findPlayerGuid($player);
$mod->rconSay($players[$guid]->getName() . " says hello to " . $players[$player_guid]->getName());
}?>
[/PHP] -
- paste ONLY.php into plugin folder
- rename ONLY.php (e.g. rename to the class you would to play only, for example Sniper.php)
- open and edit this file and rename all "ONLY"s to the filename (for example Sniper)
- put the ONLY,lst in der Config/plugins/ folder and add there your messages, e.g. Sniper-Only-Mode is active
- put the ONLY.cfg into Config/Loadable (the easiest way is to copy the Config.cfg from the Config folder)
- set in this ONLY.cfg your weaponrestriction, see: http://manuadminmod.de/index.php/Waff…_Modern_Warfare
- set [banner]enable=0
- write [ONLY] and set for ONLY the name like you rename the ONLY.php. Set the frequency when your .lst should be displayed
- add alias, e.g. Only = "readconfig only"
- in normal config set [only] enable = 0
- restart MAMmaybe this is a bad translation but i could help you.
I don't even understand this in german, and i am german.By the way: Your topic title SUXXX!
-
ehm, is my english so bad?
I'm not able to understand you, I'm sorry. -
!pbgetss
!pbgetss PID|PART_OF_NICK
Fordert einen PB-Screenshot von einem Spieler an (Engl: Requests a PunkBuster Screenshot from player)no plugin - standard command of MAM
-
PHP
Alles anzeigen<?php $mod->registerEvent("playerSay", "chatlog_write_group"); $chatlog_group_fp = fopen($logdir . "/chat_group.log", "a"); // für die Gruppe eine Logdatei festlegen $chatlog_group_name = "GRUPPENNAME"; // Name der Gruppe, die geloggt werden soll function chatlog_write_group($param) { list($guid, $text) = $param; global $players; global $chatlog_group_fp; global $chatlog_group_name; global $mod; $timestamp = date("[d.m.y H:i:s]"); $name = $players[$guid]->getName(); $text = $mod->removecolor($text); $group = $players[$guid]->getGroup(); if ($group == $chatlog_group_name) { fwrite($chatlog_group_fp, "$timestamp $name: $text\r\n"); } } ?>
Oben muss bei $chatlog_group_name der Name der Gruppe, die geloggt werden soll, angegeben werden.