本文整理匯總了PHP中Shadowfunc::displayASL方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shadowfunc::displayASL方法的具體用法?PHP Shadowfunc::displayASL怎麽用?PHP Shadowfunc::displayASL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shadowfunc
的用法示例。
在下文中一共展示了Shadowfunc::displayASL方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: onASLShowPlayer
public static function onASLShowPlayer(SR_Player $player, array $args)
{
$b = chr(2);
if ($player->getBase('age') > 0) {
return self::rply($player, '5012', array(Shadowfunc::displayASL($player), self::translate('asl')));
// return self::reply($player, sprintf("Your asl: %s. Use #asl [<age|bmi|height>] for party sums.", Shadowfunc::displayASL($player)));
} else {
$player->msg('1011', array(self::translate('aslset')));
// $player->message(sprintf("You did not setup your asl with {$b}#aslset{$b} yet. You need to do this to start moving in the game."));
return false;
}
}
示例2: onASLSetCustom
public static function onASLSetCustom(SR_Player $player, $age, $bmi, $height)
{
$age = abs((int) $age);
$bmi = abs((int) $bmi);
$height = abs((int) $height);
if (false === $player->saveVars(array('sr4pl_age' => $age, 'sr4pl_bmi' => $bmi, 'sr4pl_height' => $height))) {
self::reply($player, 'Database errror 12!');
return false;
}
$player->modify();
return self::rply($player, '5266', array(Shadowfunc::displayASL($player)));
// return self::reply($player, sprintf('Your asl has been set to %s.', Shadowfunc::displayASL($player)));
}