[Release] GameMaster On/off php script

KR373N

Well-Known Member
Joined
May 18, 2008
Messages
1,944
Reaction score
445
ГМ Лсит On/off php script

Code:
<?
include("config.php");
$query=mssql_query("SELECT * FROM Character WHERE CtlCode=32");
while($gm=mssql_fetch_array($query)){
$stat="";
$gmname=$gm['Name'];
$gmacc=$gm['AccountID'];
$query2=mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$gmacc'");
$query3=mssql_query("SELECT GameIDC FROM AccountCharacter WHERE Id='$gmacc'");
$query3=mssql_result($query3, 0, 0);
$rquery2=mssql_num_rows($query2);
if($rquery2<1) { $query2 = '0'; }
else{ $query2=mssql_result($query2, 0, 0); }
if($query2=='1'){ 
if($query3==$gmname){ 
$stat =  '<font color=green><strong>[ON]</strong></font>';
 } 
}
if($query2=='0'){
  $stat =  '<font color=red><strong>[OFF]</strong></font>';
 }
if($query2=='1' AND $query3 <> $gmname){ 
 $stat =  '<font color=red><strong>[OFF]</strong></font>';
 }
      echo "$gmname $stat";
      echo "<br>";

}
?>


Ако вашия код за ГМ е 32 Просто променете

Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR][COLOR="Red"] ("SELECT * FROM Character WHERE CtlCode=32")[/COLOR];


ако вие 8 променете така


Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR] [COLOR="Red"]("SELECT * FROM Character WHERE CtlCode=8")[/COLOR];

Enjoy!
 
Last edited:

KR373N

Well-Known Member
Joined
May 18, 2008
Messages
1,944
Reaction score
445
просто невиждам смисъл като съм дал кодовете ако вие е различно от 32 кода не трудно да промениш 1 ред :d
 

SpArKHaWk

New Member
Joined
Jun 11, 2008
Messages
29
Reaction score
7
От къде се разбира какъв е кода ти за ГМ?
 

MapTuH4y

New Member
Joined
Apr 29, 2010
Messages
1,113
Reaction score
179
Този модул неможах да разбера ко прави :D Доколкото разбрах показва кой е GM и кой не :)
 

s1z3

New Member
Joined
Jan 9, 2010
Messages
111
Reaction score
19
Ако вашия код за ГМ е 32 Просто променете

Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR][COLOR="Red"] ("SELECT * FROM Character WHERE CtlCode=32")[/COLOR];


ако вие 8 променете така


Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR] [COLOR="Red"]("SELECT * FROM Character WHERE CtlCode=8")[/COLOR];

Enjoy!
Защо просто не го направиш така:

Code:
[COLOR="SeaGreen"]$query=mssql_query[/COLOR] [COLOR="Red"]("SELECT * FROM Character WHERE CtlCode=8 and CtlCode=32")[/COLOR]
 
Last edited:

Similar threads