Raised This Month: $ Target: $400
 0% 

[STOPPED][TF2] Custom Achievement Manager With MYSQL (V1.1)


Post New Thread Reply   
 
Thread Tools Display Modes
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 11-26-2009 , 15:36   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #81

Here's some code you might want to add to an index.php for your /images/ folder:

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Image Icons</title>
</head>

<body>

<table width="100%" border="0">
    <tr>
    <td id="header" height="90" colspan="3">
        <h1>
Achievement Icons:
</h1>
<h4>          <em><hr>Click to view.<hr /><br /></em></h4>    </td>
    </tr> 
    
</table>

<?php
$path 
'./';
$dir_handle = @opendir($path) or die('Unable to open ' $path);
$array = array();
while ((
$file readdir($dir_handle)) !== false)
{
if (
$file != '.' && $file != '..')
{
$pathinfo pathinfo($file);
if (isset(
$pathinfo['extension'])) {$ext strtolower($pathinfo['extension']);} else {$ext '';}
if (
$ext == 'png' || $ext == 'jpg') {$array[] = $file;}
}
}

if (
$array)
{
sort($array);

echo 
'<ul>';
foreach (
$array as $value)
{
echo 
'<li><font face="tahoma"><a href="' $path $value '">' $value '</a></li>' "\n</font>";
}
echo 
'</ul>';
}
?>
</body>
</html>
On some servers (like mine), listing of directory/file trees is turned off by default.

Later I'll add some code to that so it shows a thumbnail of each icon...
__________________
DarthNinja is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 11-26-2009 , 15:41   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #82

I just made an images.php to my root and made it do it that way

haven't checked yours out yet but its probably heaps more professional since im somewhat poor at php haha
Mecha the Slag is offline
Pfsm999
Senior Member
Join Date: Sep 2009
Old 11-26-2009 , 17:54   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #83

Quote:
Originally Posted by DarthNinja View Post
Here's some code you might want to add to an index.php for your /images/ folder:

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Image Icons</title>
</head>

<body>

<table width="100%" border="0">
    <tr>
    <td id="header" height="90" colspan="3">
        <h1>
Achievement Icons:
</h1>
<h4>          <em><hr>Click to view.<hr /><br /></em></h4>    </td>
    </tr> 
    
</table>

<?php
$path 
'./';
$dir_handle = @opendir($path) or die('Unable to open ' $path);
$array = array();
while ((
$file readdir($dir_handle)) !== false)
{
if (
$file != '.' && $file != '..')
{
$pathinfo pathinfo($file);
if (isset(
$pathinfo['extension'])) {$ext strtolower($pathinfo['extension']);} else {$ext '';}
if (
$ext == 'png' || $ext == 'jpg') {$array[] = $file;}
}
}

if (
$array)
{
sort($array);

echo 
'<ul>';
foreach (
$array as $value)
{
echo 
'<li><font face="tahoma"><a href="' $path $value '">' $value '</a></li>' "\n</font>";
}
echo 
'</ul>';
}
?>
</body>
</html>
On some servers (like mine), listing of directory/file trees is turned off by default.

Later I'll add some code to that so it shows a thumbnail of each icon...
That's true ! I will include this file on the next version. But i will rename this file :
index.php on images folder !

I will do my best to give you the 0.6 version of plugin in the next week, Monday evening (in France) perhaps : If i have time to test it ! But i'm not sure !
__________________
Pfsm999 is offline
Broseph
Junior Member
Join Date: Aug 2009
Old 11-26-2009 , 22:21   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #84

Are you going to be integrating it with Jindo's plugin so that achievements will be displayed in chat like that?
Broseph is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 11-27-2009 , 15:32   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #85

question

how do I show the achievement web page ingame?

edit:

bugs I found
:

"Victim name contains" is actually "attacker name contains". If you have an achievement that requires the victim to contain "Slag", and your name contains Slag and you kill someone (whose name doesn't contain "Slag"), you get the achievement. Or something like that. The whole "name contains" thing seems bugged like hell.

"Distance more than" is triggered no matter what. Had it set to "distance more than 10-any meters" but it still triggered with a shovel kill sdgsf
"Distance less than" is also having the same issues :/

Condition for success: Assister achievements are even triggered if you are the attacker.

"Weapon: flaregun, crits: yes", is never triggered, not even on crits.

"If <steam id> kills you with Bonesaw" doesn't work, instead it's triggered when <steam id> gets KILLED by a bonesaw dfgdfg

Last edited by Mecha the Slag; 11-29-2009 at 07:46.
Mecha the Slag is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 11-29-2009 , 07:49   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #86

Being incredibly frustrated with the limitations of this plugin, I made my own from scratch with some inspiration from this plugin.

[IMG]http://img6.**************/img6/5036/achievement60003.jpg[/IMG]

[IMG]http://img39.**************/img39/5080/achievement60005.jpg[/IMG]

[IMG]http://img504.**************/img504/5036/achievement60003.jpg[/IMG]

[IMG]http://img69.**************/img69/5036/achievement60003.jpg[/IMG]

It uses a completely different system, slightly more complex but easy to manage. Pfsm999 if you could contact me in any way I'd love it if you could help me out since I am having some issues with sql connections (being rather new to SourcePawn)

Last edited by Mecha the Slag; 11-29-2009 at 09:53.
Mecha the Slag is offline
Cerise
Senior Member
Join Date: Jun 2009
Location: debug_backtrace()
Old 11-29-2009 , 07:52   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #87

The v0.6 is coming very soon, there will be much more functions in it,
btw Pfsm wont be on til' monday or tuesday ( French time ) ^^

Anyway, nice work : )
Cerise is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 11-30-2009 , 00:47   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #88

Here are some more icons for you to play with:
http://teamfortress2.fr/achievements.php?eng
__________________
DarthNinja is offline
Pfsm999
Senior Member
Join Date: Sep 2009
Old 11-30-2009 , 08:07   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #89

Hi all,

Sorry for this absence, i was not on my home to continy work in last week end !

The version 0.6 of this plugin include :

1) New web- interface for administration and new possibility :
  • In kill achievement : Possibility to specificate two class : One for attacker and one for victim (you will see)
  • In kill achievement : Possibility to specificate HP of attacker (less than, more than ...)
  • You can decide when a player finish a achievement to hear a sound only for player, or for all !
  • Reset one per one your finished achievements on sourcemod menu in game.
  • New possibility :
    • Engineer achievements : Build, Detroy, Teleport
    • Medic : Ubercharge X men
    • Sniper : Jarate X men or Razorback X spy
    • Heavy : Eat X sandwitch or Give X sandwitch
    • Scout : Stunt X man or Drink X bonk
    • Fun : Say Y in chatbox
  • Correctly some bug on code !
  • Clean all the code and variables (g_ for general variables, str for local variable and arg for argVariables.
I will test tonight the plugin on my server to see if all work correctly !
And after that .... that will be the 0.7 with map possibility and 0.8 with one life achievements.
__________________
Pfsm999 is offline
Pfsm999
Senior Member
Join Date: Sep 2009
Old 12-01-2009 , 18:42   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #90

And that was not for tonight and i have a bad news : Bonk drink is very hard to include in Pawn Language

If you have an idea to detect a bonk drink ... please tell me !
__________________
Pfsm999 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode