ok finally i made it work. just want to share it because seems like nobody wants to share it here.
you need to match the rid with your current table. edit in the script or edit in your table.
some codes for other rooms still dont work.
im not a coder so the script may not be ok, i used copy paste lol. antiflood also doesnt work.
u need to add this on core..
you need to match the rid with your current table. edit in the script or edit in your table.
some codes for other rooms still dont work.
im not a coder so the script may not be ok, i used copy paste lol. antiflood also doesnt work.
u need to add this on core..
Code:
//////////////////////////////////////////// Search Id function iscowner($uid, $rid) { $candoit = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_rooms WHERE id='".$rid."'")); if($uid==$candoit[0]||ismod($uid)) { return true; } return false; } ///////////////////////////////////////////is shielded? function kick($uid,$rid) { $not = mysql_fetch_array(mysql_query("SELECT kick FROM ibwf_kick WHERE uid='".$uid."' AND rid='".$rid."'")); if($not[0]=='1') { return true; }else{ return false; } } function chall($byuid, $touid) { $res = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_jnp WHERE ((byuid='".$byuid."' AND touid='".$touid."') OR (byuid='".$touid."' AND touid='".$byuid."'))")); if($res[0]>0) { return true; } return false; } ///////////////////////////////////function isuser function inside($uid, $rid) { $ins = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."'")); if($ins[0]>0) { return true; }else{ return false; } } ///////////////////////////////////function isuser function inside2($uid, $rid) { $ins = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE chatter='".$uid."' AND rid='".$rid."'")); if($ins[0]>0) { return true; }else{ return false; } } //////////////////////Function add user to online list :P function addplace($uid,$plc) { $res = mysql_query("UPDATE ibwf_users SET saan='".$plc."' WHERE id='".$uid."'"); $res = mysql_query("INSERT INTO ibwf_users SET id='".$uid."', saan='".$plc."'"); if(!$res) { //most probably userid already in the online list //so just update the place and time $res = mysql_query("UPDATE ibwf_users SET saan='".$plc."' WHERE id='".$uid."'"); } } ///////////////////////////////////////////is shielded? function locked($uid, $rid) { $not = mysql_fetch_array(mysql_query("SELECT locked FROM ibwf_rooms WHERE id='".$rid."'")); if($not[0]=='1') { return true; }else{ return false; } } ///////////////////////////////////////////is shielded? function turn($uid) { $not = mysql_fetch_array(mysql_query("SELECT hit FROM ibwf_users WHERE id='".$uid."'")); if($not[0]=='1') { return true; }else{ return false; } } ///////////////////////////////////////////is shielded? function noact($uid) { $not = mysql_fetch_array(mysql_query("SELECT hit FROM ibwf_users WHERE id='".$uid."'")); if($not[0]=='3') { return true; }else{ return false; } } function have() { $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_quiz")); return $nopop[0]; } function correct($answer,$id) { $uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_quizrooms WHERE answer='".$answer."' AND id='".$id."'")); return $uid[0]; } /////////////////////////////////////////////////paper function echo_scores($pscore,$cscore,$pchoice,$cchoice,$wld) { if ($wld == "won") { $text = "You chose $pchoice. Your opponent chose $cchoice. You won."; } if ($wld == "lost") { $text = "You chose $pchoice. Your opponent chose $cchoice. You lost."; } if ($wld == "drew") { $text = "You chose $pchoice. So did your opponent. You draw."; } echo "You: $pscore<br/>"; echo "Opponent: $cscore<br/>"; echo "$text<br/>"; echo $game; return true; } /////////////////////////////////////////////////paper function echo_scores2($uid,$poy,$pchoice,$cchoice,$wld) { $nopl = mysql_fetch_array(mysql_query("SELECT byuid FROM ibwf_jnp WHERE id='".$poy."'")); $unick = getnick_uid($nopl[0]); if ($wld == "won") { $text = "You chose $pchoice, $unick chose $cchoice. You WON!"; } if ($wld == "lost") { $text = "You chose $pchoice, $unick chose $cchoice. You LOSE!"; } if ($wld == "drew") { $text = "You chose $pchoice, $unick chose $cchoice. DRAW!"; } echo "$text<br/>"; return true; } function strClean($text){ $tex = strip_tags($text); $tex = stripslashes(stripslashes($tex)); return $tex; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////
Comment