• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MODERN AAC - Character Deaths, Character Frags, Latest Deaths.

How can I implement it without the user having to be logged in to see the frags. I would like to have it public just like the death.

Since I cant edit my post i will quote it.

Its to back up my previous post. I just realized that I only cant see the victims of my own player when I am only logged in.

I would like to have everybodys victim public that everybody can see them without having to log in.

for example:

KalimaWar - Characters

When you look up a player you can see that player frags without having to log in + you can see anybody's frags.


Thanks you very much in advance.
 
Got it.

Just had to remove the authentication part. This is how I accomplished it.



<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');

$accountId = (!empty($_SESSION['account_id']) ? $_SESSION['account_id'] : false);
$player = $GLOBALS['player'];
$config = $GLOBALS['config'];

$SQL = POT::getInstance()->getDBHandle();
$frags = $SQL->query("SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = {$player->getId()} ORDER BY `date` DESC LIMIT 0,10;");

if($frags->rowCount())
{
echo "<div class=\"bar\">Player Kills</div>";

foreach($frags as $frag)
echo "<table style=\"width: 100%;\"><tr class=\"highlight\"><td width=\"25%\">".date($config['dateFormat'], $frag['date'])."</td><td width=\"65%\">Killed <a href=\"".WEBSITE."/index.php/character/view/{$frag['name']}\">{$frag['name']}</a> at Level {$frag['level']}.</td><td width=\"10%\"><span style=\"color: ".($frag['unjustified'] ? "red;\">unjustified" : "green;\">Jusified")."</span></td></tr></table>";
}

?>
 
Got it.

Just had to remove the authentication part. This is how I accomplished it.

Error:
PHP:
A PHP Error was encountered

Severity: Notice

Message: Undefined index: dateFormat

Filename: frags/injection.php

Line Number: 16
 
HTML:
Deaths
Dec 23 2011, 15:03:08 GMTKilled at Level 54 by Fisk.Dec 23 2011, 12:17:42 GMTKilled at Level 55 by Fisk.Dec 23 2011, 12:16:29 GMTKilled at Level 55 by Fisk.Dec 23 2011, 12:14:07 GMTKilled at Level 56 by Fisk.Dec 23 2011, 12:10:30 GMTKilled at Level 57 by Fisk. 




Quest Name                                                 Status

this is how it looks now. 2 problems i will fix.

first

HTML:
Deaths
Dec 23 2011, 15:03:08 GMTKilled at Level 54 by Fisk.Dec 23 2011, 12:17:42 GMTKilled at Level 55 by Fisk.Dec 23 2011, 12:16:29 GMTKilled at Level 55 by Fisk.Dec 23 2011, 12:14:07 GMTKilled at Level 56 by Fisk.Dec 23 2011, 12:10:30 GMTKilled at Level 57 by Fisk.
want this like:

HTML:
Deaths
Dec 23 2011, 15:03:08 GMT Killed at Level 54 by Fisk.
Dec 23 2011, 12:17:42 GMT Killed at Level 55 by Fisk.
Dec 23 2011, 12:16:29 GMT Killed at Level 55 by Fisk.
Dec 23 2011, 12:14:07 GMT Killed at Level 56 by Fisk.
Dec 23 2011, 12:10:30 GMT Killed at Level 57 by Fisk.
second how do i put the death list below quest list?:/
 
someone can change this part into 0.3.4 pl2? I mean

>query("SELECT `environment_killers`.`name` AS `monster_name`, `players`.`name` AS `player_name`, `players`.`deleted` AS `player_exists` FROM `killers` LEFT JOIN `environment_killers` ON `killers`.`id` = `environment_killers`.`kill_id`
LEFT JOIN `player_killers` ON `killers`.`id` = `player_killers`.`kill_id` LEFT JOIN `players` ON `players`.`id` = `player_killers`.`player_id`
WHERE `killers`.`death_id` = {$SQL->quote($death['id'])} ORDER BY `killers`.`final_hit` DESC, `killers`.`id` ASC")->fetchAll();


when in tables only exist in player deaths:
player_id
time
level
killed_by
atkilled_by

pls
 
Back
Top