Bij dit script krijg ik een message box. Hoe kan ik die message box weghalen en zorgen dat er een vooraf ingesteld bericht komt in plaats van het bericht dat in de message box ingevuld word?
PHP
foreach ($custom_cmds as $ccmd)
{
$ccmd = explode('/',$ccmd,3);
if (strpos($ccmd[1], '%m') !== false)
{
$s = ($t[0]+ (int) $ccmd[2]);
echo '<a href="#" onclick="CmdMsg(\''.$ccmd[1].'\',\''.$ccmd[1].'\',\''.$s.'\'); return false" title="'.$ccmd[1].'">'.$ccmd[0].'</a>';
} else {
$s = $ccmd[1].' '.($t[0]+ (int) $ccmd[2]);
echo '<a href="#" onclick="CustomCmd(\''.$s.'\'); return false" title="'.$s.'">'.$ccmd[0].'</a>';
}
Toon Meer
En dit is de $custom_cmds:
PHP
// if command contains %m, a query pops up for you to enter a message
// then you have to specify position for player ID by %n
// and remember to enclose the message into quotes: "
// $custom_cmds[] = 'PB Kick+msg/pb_sv_kick %n 15 "%m"/1'; //kick for 15 minutes and tell the others the reason