thanks Manu, the getName trick works.
I dont know but it works now the kick line
thanks Manu, the getName trick works.
I dont know but it works now the kick line
Maybe somebody can help me, I have this code:
$number = 5;
$xuid = $mod->findPlayerGuid($number);
$players[$xuid]->kick($mod->getCV("registered", "kickreason"));
$mod->rconSay("player number $number kicked);
I get an php error on the $players sintax. I´m sure it is very simple. I´m working on an script for kick player number because its use a for sentence.
Another kick question, is something like "findplayerguid" but for player name? like findplayerName($n);
thanks
Hi, there is a way to make the random map and mode rotation with specific modes for each map? I want to add Oneflag CTF but only for native mw2 maps and skip the resurgence map pack with hangs the server.
Like Afghan : Dom, Sab, CFT
Favela: DD, OneFlag, War
thanks!
its possible to make and expression to forbid nickname with spaces? like "A R N O L D" I can´t kick or ban players with spaces no their names!
here´s my weapon restriction, it works for RPG7, GL and THUMPER.
[weaponrestrictions]
enabled = 1
weapons = "gl,m79,rpg,rpg_mp,m79_mp"
warnstokick = 2
mode = "kick"
kickreason = "Arma Prohibida: <WEAPON>"
thanks Luk, so the functions works inside php, but we dont have ANY command to set the team for a player.
My test works, but Manu seems the have 1 thread at time, and the mod is unresponsive for that period of time...
Searching on Manu I found this:
public function setTeam($team) {
public function getTeam() {
public function getPlayerList() {
This funtions actually works? If they work maybe I can wrote a command to get all the players xuid, and team, and re-assing to a random team or use like autoteambalance feature.
Somebody can confim this?
It works with parts of the name too.
In the folder config\plugins you have a file called BADNAMES.LST
Inside this file you can write forbidden words or parts.
Also check in your CONFIG.CFG of manu this is enabled.
[nameprotection]
enabled = 1
badnamekick = 1
badnamekickmode = "kick"
Thanks a lot Manu! You´r always saving me.
more noob questions,
With time() I can get current time right?
What If I do the following, I will work?
<?php
$mod->registerEvent("playerJoined", "TimedMessage");
function TimedMessage($params) {
global $players;
$PlayerID = $players[$params]->getGuid();
$PlayerName = $players[$params]->getName();
JoinTime = Time();
do {
CurrentTime = Time();
Difference = (JoinTime - CurrentTime);
if (Difference == 60) {
$str = "^3You have been playing exactly for 1 minute";
$players[$PlayerID]->say($str);
}
if (Difference > 61) {
break;
}
// if (player leaves then playerleft = 1)
} while ($PlayerLeft > 0);
}
?>
Alles anzeigen
Thanks!
But this event has no "amount of time" parameter?
Is somewhere a list of Events? to see what can I do with manu and mw2?
Hi, maybe somebody can help me, its possible to make timed events? Like run a php plugin every 30 minutes? Or make a cycle code with time?
Like check the ping every one minute or hour.
thanks!
thanks a lot Manu!
But I´m not sure if I´m get it right. I made this example:
<?php
$mod->registerCommand("showinfo", false, "sinfo");
function sinfo($params) {
global $mod;
global $players;
$towarn = $mod->findPlayerGuid($player);
/* Player XUID */
$PlayerGuid = $players[$towarn]->getGuid();
/* Player ClientID */
$PlayerId = $players[$towarn]->getPid();
/* Nickname */
$PlayerNickname = $players[$towarn]->getName();
$str = "^Info on player: $PlayerNickname ; ID is $PlayerID , XUID is $PlayerGuid";
/* Show the info to the player called*/
$MyOwnGuid = $players[$parametros]->getGuid();
$players[$MyOwnGuid]->say($str);
}
?>
Alles anzeigen
I have a new question, How to send a player parameter to the function? But only with part of the name like the kick command.
I you have a player named "destroyer" you can use:
!votekick destro
How I can use this with my own command?
(I´m making a tool to know if a player is in a text file)
thanks!
oh, ok, (sorry about not searching first)
Hi, I´m wondering if is any way to make a plugin for suffle the players on the game.
Sometimes you are playing 9vs5 and nobody want to balance, and the autoteambalance of cod just sucks.
thanks!
Here, is in "registered players" topic
http://manuadminmod.de/forum/index.php?page=Thread&threadID=1194&
thanks master
question: what is $allowed ?