Jump to content
  • 0

Psaxnw guide gia status se site pedia.


Question

4 answers to this question

Recommended Posts

  • 0
Posted

Pedia xreiazome ena guide na dixnei pws na peraso ta status  Top Pvp . PK  kai diafora alla i na dixnei kati paromoio.. Thanks :)

Ψάξε και λίγο υπάρχουν πολλα...!
  • 0
Posted

PvP

<?php
//---------CONFIGS---------
$type="1"; //Type 1 
$server="localhost"; // MySQL IP
$user="root"; //MySQL Username
$password=""; //MySQL Password
$database="gs"; //MySQL Database
$top="5"; 
//-----END OF CONFIGS-----
mysql_connect("$server", "$user", "$password") or die(mysql_error());
mysql_select_db("$database") or die(mysql_error());

if($type == '1'){
$result = mysql_query("SELECT char_name,pvpkills FROM characters where pvpkills>0 and accesslevel=0 order by pvpkills desc")
or die(mysql_error());
echo "<center><b>Top $top PvP Players</b></center><table border=1 align=center><tr> <th>Character</th> <th>PvP's</th> </tr>";
$sum1=0;
while($row = mysql_fetch_array( $result )) {
	$name = $row['char_name'];
	$pvpkills = $row['pvpkills'];
	if ($sum1<$top) {
	echo "<tr><td align=center>$name</td><td align=center>$pvpkills</td></tr>";
	$sum1++;
	}
}
}

else {
echo "<center>Please config the variable $type. Make it <b>1</b> for Top Status</center>";
}
?>

 

pk

<?php
//---------CONFIGS---------
$type="1"; //Type 1 
$server="localhost"; // MySQL IP
$user="root"; //MySQL Username
$password=""; //MySQL Password
$database="gs"; //MySQL Database
$top="5"; 
//-----END OF CONFIGS-----
mysql_connect("$server", "$user", "$password") or die(mysql_error());
mysql_select_db("$database") or die(mysql_error());

if($type == '1'){
$result = mysql_query("SELECT char_name,pkkills FROM characters where pkkills>0 and accesslevel=0 order by pkkills desc")
or die(mysql_error());
echo "<center><b>Top $top Pk Players</b></center><table border=1 align=center><tr> <th>Character</th> <th>Pk's</th> </tr>";
$sum1=0;
while($row = mysql_fetch_array( $result )) {
	$name = $row['char_name'];
	$pkkills = $row['pkkills'];
	if ($sum1<$top) {
	echo "<tr><td align=center>$name</td><td align=center>$pkkills</td></tr>";
	$sum1++;
	}
}
}

else {
echo "<center>Please config the variable $type. Make it <b>1</b> for Top Status</center>";
}
?>

 

 

<?php require 'toppvp.php';?>

 

<?php require 'toppk.php';?>

 

βάλτα όπου θες απλά αν αλλαξεις όνομα στα scripts φρόντισε να αλλαξεις και στα πιο πανω (<?php require 'το ονομα κτλ';?>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..