コード例 #1
0
ファイル: limiters.php プロジェクト: Rafal0686/bf2servertool
  * PLAYER STATS MESSAGE
  * 
  * - Displays a message with the following data:
  * 	- Name
  * 	- Ping
  * 	- Class
  * 	- Rank
  * 	- Kills and deaths
  * 	- Score
  * 	- VIP
  */
 if ($settings['tool_sm'] > 0 && time() - $settings['tool_sm_last'] >= $settings['tool_sm']) {
     // The message
     $message = replace($settings['tool_sm_msg'], array('%name%' => $player->name, '%ping%' => $player->ping, '%class%' => $kit, '%rank%' => $player->level, '%kills%' => $player->kills, '%deaths%' => $player->deaths, '%score%' => $player->score, '%vip%' => $player->vip == '1' ? 'Yes' : 'No'));
     // Send it to the player
     $ct->sendPlayer($player->name, $message);
     // Wait 0.5 seconds
     sleep(0.5);
 }
 /**
  * WHITELIST 
  *
  * Check if the player is in the whitelist and whitelist is enabled, if yes: skip
  */
 if ($settings['tool_wl'] == 'true' && $wl->checkPlayer($player->nucleusId)) {
     continue;
 }
 /**
  * LEVEL LIMITER
  * 
  * - Checks minimum level