tested my server Thanks works fine
but If another player enters the same name. how to kick?
use name protection if it works
tested my server Thanks works fine
but If another player enters the same name. how to kick?
use name protection if it works
what i want to know if its possible to add a time delay between a user joining and the kick?
done some experimenting... usually end up with a crash
edit:
heres a registration plugin for name whitelisting... never tested it
$mod->registerEvent("playerJoined", "registered_main");$mod->setDefaultCV("registered", "enabled", 1);$mod->setDefaultCV("registered", "kickreason", "->KICK_REASON<-");
$file = $configdir . "plugins/whitelist.lst"; $results = explode(",", file_get_contents($file));$whitelist = array();foreach($results as $result) { $whitelist[] = trim($result);}
function registered_main($guid) { global $mod, $players,$whitelist; $names = $players[$guid]->getName(); if($mod->getCV("registered", "enabled") == 0) { return; } if (!in_array($names, $whitelist)) { $players[$guid]->kick($mod->getCV("registered", "kickreason")); }}
whats with problem with the line breaks?
first of all
hi to everyone
heres a working registration.php
$mod->registerEvent("playerJoined", "registered_main");
$mod->setDefaultCV("registered", "enabled", 1);
$mod->setDefaultCV("registered", "kickreason", "Molimo registrajte se na www.h8breed.com");
function registered_main($guid) {
global $mod;
global $players;
global $logging;
$usersreg = array("guid","guid","guid");
if (in_array($players[$guid]->getGuid(), $usersreg)) {
}
else {
$players[$guid]->kick($mod->getCV("registered", "kickreason"));
}
}
Alles anzeigen