i can do one but first its like in config.cfg
[tag]
enabled = 1
tagname = your tag name here
but
when some one joined is player or user and have tag kicked
when some one joined and no tag ofc no kick but if he change name to your tag start with your tag name first he should say some
message in-game to kick cause idk how to events maybe in namechangerannouncer i can get some infos and do it do you want like that ?
Beiträge von Callod4
-
-
Hi @Mirko911
I want MAM to show time and date together automatically
Is there a way I can use this plugin to so time & date by banner msg?@Azad69 here
and for time <time>
to check online players <PLAYERSONLINE>
and admin <ADMINNAME> <ADMINGROUP>
using like example
there are <PLAYERSONLINE>/20 online players in the server
online admins : <adminname> <admingroup>
today its : <time>
about adminname and admingroup its just show 1 adminSpoiler anzeigen
PHP
Alles anzeigen<?php /** * PROJECT: ManuAdminMod (0.12 Beta) * WEBSITE: http://www.manuadminmod.de * AUTHORS: Manu (Original Author) | Dennis, Hackebein, Master of Little, Mirko911, Yenz * LICENSE: Creative Commons BY-NC-SA 4.0 (http://creativecommons.org/licenses/by-nc-sa/4.0/) * PERMITS: If you want to obtain additional permissions, contact us at: Webmaster@ManuAdminMod.de **/ //Banner einlesen und die Z�hlvariablen auf 0 setzen function banner_read() { global $banner_banner; $configdir = $GLOBALS['mod']->getConfigDir(); $banner_banner = explode("\n", file_get_contents($configdir . "/plugins/banner.lst")); $banner_banner = array_map("trim", $banner_banner); } $banner_lasttime = 0; $banner_current = 0; //Event registrieren $mod->registerEvent("everyTime", "banner_send"); $mod->registerEvent("parseConfig", "banner_read"); //Default CVs registrieren $mod->setDefaultCV("banner", "enabled", 0); $mod->setDefaultCV("banner", "time", 120); $mod->setDefaultCV("banner", "logging", 1); banner_read(); //Funktion die bei jedem durchlauf aufgerufen wird function banner_send() { global $banner_banner; global $banner_lasttime; global $banner_current; global $mod; global $players; global $logging; //Ist [banner]enabled = 1 if (!$mod->getCV("banner", "enabled")) { return false; } //Pr�fen, wann der letzte Banner gesendet wurde und ggf. n�chsten senden if (time() - $banner_lasttime > $mod->getCV("banner", "time")) { //Z�hler ggf. zur�cksetzen, wenn EOF bei banner.lst if ($banner_current >= count($banner_banner)) { $banner_current = 0; } $send = $banner_banner[$banner_current]; //Is <NEXTMAP> or <NEXTGT> used if (strpos($send, "<NEXTMAP>") !== false || strpos($send, "<NEXTGT>") !== false) { list($nextmap, $nextgt) = $mod->rconGetNextMap(); $nextmap = $mod->getLongMapName($nextmap); $nextgt = $mod->getLongGametype($nextgt); $send = str_replace(array("<NEXTMAP>", "<NEXTGT>"), array($nextmap, $nextgt), $send); } $send = str_replace("<VERSION>", VERSION, $send); if(strpos($send, "<PLAYERSONLINE>") !== false){ $count = count($players); $send = str_replace("<PLAYERSONLINE>",$count,$send); } if(strpos($send,"<ADMINNAME>") !== false){ $admins = $mod->getAdmins(); $online = array(); foreach($admins as $adminguid => $admin){ if(array_key_exists($adminguid,$players)){ $online[] = array( "name" => $players[$adminguid]->getName(), "group" => $players[$adminguid]->getGroup() ); } } $str = $mod->getLngString("onlineadmins") . " "; if(count($online) > 0){ foreach($online as $admin){ $thename = $admin["name"]; $thegroup = $mod->getLongGroupName($admin["group"]); $send = str_replace(array("<ADMINNAME>","<ADMINGROUP>"),array($thename,$thegroup),$send); } }else{ $none = $mod->getLngString("onlineAdminsNone"); $send = str_replace($send,$none,$send); } } if(strpos($send,"<time>") !== false){ $time = date("Y/m/d H:i:s"); $send = str_replace("<time>",$time,$send); } //Banner senden $mod->rconSay($send); //Log Message to the mod.log if($mod->getCV("banner", "logging")){ $logging->write(MOD_NOTICE, "Banner message was sent: ".$send); } //Z�hler erh�hen und Zeit neu setzen $banner_lasttime = time(); $banner_current ++; } } ?>