Jump to content
  • 0

Psaxnw guide gia status se site pedia.


•Shadow•
 Share

Question

4 answers to this question

Recommended Posts

  • 0

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

Ψάξε και λίγο υπάρχουν πολλα...!
Link to comment
Share on other sites

  • 0

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 'το ονομα κτλ';?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock