
VitalEnd
Members-
Posts
68 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by VitalEnd
-
Parse error: syntax error, unexpected ')', expecting ']' in /home/vitalend/public_html/forums.php on line 363
-
Basically i need a Report button to show on each forum thread, kind of like this: <form action='forums.php' method='post'> <input type='hidden' name='fp_poster_id' value='{$r['fp_poster_id']}'> <input type='hidden' name='fp_id' value='{$r['fp_id']}'> <input type='hidden' name='fp_text' value='{$r['fp_text']}'> <input type='submit' value='Report'> </form> If someone could just post up the rest of the code just so when someone clicks the button it prints "Post has successfully been reported" and inserts it into the database. Thanks for any help anyone can give :) 8)
-
Can't wait for this, I found flydians gang system a little hard to work with though, hard to edit things, hopefully this mod will be coded in a way for myself and others to understand easily and modify it to our needs if necessary. Good work :)
-
mccode-v1 Stock Market. Working + Secured
VitalEnd replied to Haunted Dawg's topic in Free Modifications
Well this is new i havent come across this before but i do think there are bugs ? The price change bit is wrong and when it the buy now price goes negative when it shouldn't, easily fixed i belive though :) -
Ah great, thanks guys :D
-
Basically i have an upload avatar feature which uploads them to a file in my directory, this file is called Avatars. I would just like to know how i would put a query so a user could click the link saying "delete avatar" and it would delete that file from the avatars file, Possible or not? - Thanks
-
This code fails I have tried and was still able to use a proxy You are using it wrong then, i have it on my register page and it works great.
-
Sorry to bump an old post but proxies could be blocked in one line of code which i take no credit for as i found it online somewhere .... if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) ) { die("Proxy Detected"); }
-
the newsletter is similar however not what hes talking about i dont think. Here is the mass emailer link: [mccode v2.x] Mass emailer
-
Yes but you would make claymores hard to get, and so the user selects what page to put it on so it wouldn't get annoying, just adds a little fun to the game.
-
View User + Userlist w/ ajax via jQuery (Not done)
VitalEnd replied to Aurora078's topic in Requests & In Production
Have a go at an ajax mailbox, that would be pretty smart :) -
How to change font color in captcha verify ?
VitalEnd replied to VitalEnd's topic in Modification Support
Ahh i got it now ... thanks everyone and Haunted Dawg that did the trick :) -
How to change font color in captcha verify ?
VitalEnd replied to VitalEnd's topic in Modification Support
ive got a black background and black text making the text impossible to see lol, i need the text red. -
How to change font color in captcha verify ?
VitalEnd replied to VitalEnd's topic in Modification Support
^^ thats the background color .. i got that ive got the background and those lines black, just need the text red now -
How to change font color in captcha verify ?
VitalEnd replied to VitalEnd's topic in Modification Support
Thanks for the reply, ive changed all of those to make it red, white orange you name it, but nothing works, all i want is a black camptcha with grey border and red text inside. -
Can someone just highlight in here where i change the font color ? Im lost ive tried editing all the numbers but nothing works. Is it default black or something ? How do i make the text white. <?php function parse_bgcolor() { if(strlen($_GET['bgcolor']) == 6) { $p1=$_GET['bgcolor'][0].$_GET['bgcolor'][1]; $p2=$_GET['bgcolor'][2].$_GET['bgcolor'][3]; $p3=$_GET['bgcolor'][4].$_GET['bgcolor'][5]; } else { $p1=$_GET['bgcolor'][0].$_GET['bgcolor'][0]; $p2=$_GET['bgcolor'][1].$_GET['bgcolor'][1]; $p3=$_GET['bgcolor'][2].$_GET['bgcolor'][2]; } return array(hexdec($p1),hexdec($p2),hexdec($p3)); } session_start(); $bgcolor=($_GET['bgcolor']) ? parse_bgcolor() : array(255,255,255); $text=array(255-$bgcolor[0],255-$bgcolor[1],255-$bgcolor[2]); $distort=rand(80,120)/100; $distort2=rand(80,120)/100; $f_x=round(75*$distort); $f_y=round(25*$distort); $s_x=round(175*$distort2); $s_y=round(70*$distort2); $first=imagecreatetruecolor($f_x, $f_y); $second=imagecreatetruecolor($s_x, $s_y); $white=imagecolorallocate($first, $bgcolor[0], $bgcolor[1], $bgcolor[2]); $black=imagecolorallocate($first, 0, 0, 0); $red=imagecolorallocate($first, 255, 0, 0); $green=imagecolorallocate($first, 0, 128, 0); $blue=imagecolorallocate($first, 0, 0, 255); imagefill($first, 0, 0, $white); $color[0]=$red; $color[1]=$green; $color[2]=$blue; for($i=0; $i<=2; $i++) { $points = array( 0 => array(10, $f_x - 10), 1 => array(5, $f_y - 5), 2 => array(10, $f_x - 10), 3 => array(5, $f_y - 5), 4 => array(10, $f_x - 10), 5 => array(5, $f_y - 5), 6 => array(10, $f_x - 10), 7 => array(5, $f_y - 5), 8 => array(10, $f_x - 10), 9 => array(5, $f_y - 5), ); imagefilledpolygon($first, $points, 5, $red); } imagestring($first, 4, rand(0, $f_x/3), rand(0,$f_y/2.5), $_SESSION['captcha'], $black); imagecopyresized($second, $first, 0, 0, 0, 0, $s_x, $s_y, $f_x, $f_y); imagedestroy($first); $red=imagecolorallocate($second, 255, 0, 0); $green=imagecolorallocate($second, 0, 128, 0); $blue=imagecolorallocate($second, 0, 0, 255); $RandomPixels=ceil($s_x*$s_y/100); for($i=0;$i<$RandomPixels;$i++) { $locx=rand(0,$s_x-1); $locy=rand(0,$s_y-1); imagesetpixel($second, $locx, $locy, $red); } for($i=0;$i<$RandomPixels;$i++) { $locx=rand(0,$s_x-1); $locy=rand(0,$s_y-1); imagesetpixel($second, $locx, $locy, $green); } for($i=0;$i<$RandomPixels;$i++) { $locx=rand(0,$s_x-1); $locy=rand(0,$s_y-1); imagesetpixel($second, $locx, $locy, $blue); } $randcolor=imagecolorallocate($second, rand(100,255), rand(100,255), rand(100,255)); for($i=0; $i<5; $i++) { imageline($second, rand(0, $s_x), rand(0, $s_y), rand(0, $s_x), rand(0, $s_y), $randcolor); $randcolor=imagecolorallocate($second, rand(100,255), rand(100,255), rand(100,255)); } @header("Content-Type: image/png"); $finished=imagerotate($second, rand(0,15)-7.5, $bgcolor[2]*65536+$bgcolor[1]*256+$bgcolor[0]); imagedestroy($second); imagepng($finished); imagedestroy($finished); ?>
-
OK a user can buy a claymore fro the shop, this will be a certain item so the id will need to be specified in the file when coded, the users clicks set claymore by the item and types in the name of the page where they want to set it. EG.: index.php so next time the user clicks home they will get a message: You just got hit by a claymore! For those of you who don't know, a claymore is sort of like a land mine but just an explosive with lasers coming out and once the enemy walks through the laser it sets off the explosion I'm sure this mod could be made, i would do it but i'm not that experienced in coding yet.
-
Peter does a good job, he charges $100 and codes it in too, he took about a week to design a custom unique layout for me and then coded it in 2 days.
-
Would be a much better mod if it gave their money back and notifed them that they have been outbid :) IMO
-
Basically i am using a very good auction i found here on MWG which was free. I have recently noticed that when a user outbids someone, the user with the previous bid is not notified and does not get their money back ... I have had a go at fixing this and failed so i would ery much appreciate some help in this bit and just add it in so they get an event saying "You have been outbid on an auction" and give them their money back. The auction file: <?php //Made by zeddicus, do NOT re-distribute. //Copyright 2010 include(DIRNAME(__FILE__).'/globals.php'); $_GET['page'] = isset($_GET['page']) ? trim($_GET['page']) : 'index'; switch($_GET['page']) { case 'index' : index(); break; case 'Bid' : Bid(); break; case 'Add' : Add(); break; default : index(); break; } function index() { global $h; $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`Time`,g.`CurrentBid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`)") or die(mysql_error()); echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Auction House</span> <hr width = "90%"> <table border = "0" class = "table" align = "center" width = "90%" style = "text-align:center" cellspacing = "1"> <tr> <th>Seller</th> <th>Item</th> <th>Time Left</th> <th>Current Bid</th> <th>Links</th> </tr>'); if(!mysql_num_rows($Data)) { echo ('<tr> <td colspan = "5">There are no auction being held at the present time.</td> </tr> </table>'); exit($h->endpage()); }else{ while($aData = mysql_fetch_array($Data)) { $time = $aData['Time'] - time() + $aData['TimeLeft']; echo (' <tr> <td>'.$aData['SellerID'].'</td> <td>'.stripslashes(htmlentities($aData['itmname'])).'</td> <td>'.time_format($time).'</td> <td width = "15%">$'.number_format($aData['CurrentBid']).'</td> <td width = "15%" align = "center"><a href = "auction.php?page=Bid&ID='.$aData['ID'].'"><span style = "color:#8B0000">Bid</span></a>|| <a href = "iteminfo.php?ID='.$aData['ItemID'].'"><span style = "color:#8B0000">Info</span></a></td>'); } echo ('</tr> </table> '); } $h->endpage(); } function Bid() { global $h,$ir; echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Bidding on Item</span> <hr width = "90%">'); $Data = mysql_query("SELECT g.`ID`,g.`SellerID`,g.`ItemID`,g.`CurrentBid`,g.`BuyNow`,g.`TimeLeft`,i.`itmid`,i.`itmname` FROM `gAuction` g LEFT JOIN `items` i ON (g.`ItemID` = i.`itmid`) WHERE (g.`ID` = ".abs(intval($_GET['ID'])).")") or die(mysql_error()); if(!mysql_num_rows($Data) || !ctype_digit($_GET['ID'])) { echo ('An error has occurred, please go back and try again.'); exit($h->endpage()); } $Data = mysql_fetch_array($Data); if((isset($_POST['bid']))) { if(!ctype_digit($_POST['bid'])) { echo ('An error has occurred, please try again.'); exit($h->endpage()); } if($_POST['bid'] < $Data['CurrentBid'] || $ir['money'] < $_POST['bid']) { echo ('You\'ve bidded below the current bid, or you don\'t have enough cash to bid. <a href = "/auction.php"><span style = "color:#8B0000">Go Back</span></a>'); exit($h->endpage()); } if($_POST['bid'] >= $Data['BuyNow'] && $Data['BuyNow'] > 0) { mysql_query("DELETE FROM `gAuction` WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); //Auction Delete mysql_query("UPDATE `users` SET `money` = `money` - ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$_SESSION['userid'].")"); //Take cash from user mysql_query("INSERT INTO `inventory` VALUES ('',".$Data['ItemID'].",".$_SESSION['userid'].",1)"); // Credit winner item event_add($Data['SellerID'],''.mysql_real_escape_string($ir['username']).' bought your item of the auction using your "Buy It Now Price" ($'.number_format($Data['BuyNow']).')'); mysql_query("UPDATE `users` SET `money` = `money` + ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$Data['SellerID'].")"); //Give cash to user echo ('You\'ve successfully purchased the item from the Auction using the "Buy It Now" price!. <a href = "/index.php"><span style = "color:#8B0000">Go Home</span></a>'); }else{ mysql_query("UPDATE `gAuction` SET `CurrentBid` = ".abs(intval($_POST['bid']))." WHERE (`ID` = ".abs(intval($_GET['ID'])).")"); // mysql_query("INSERT INTO `gAuctionBids` VALUES ('',".$Data['ID'].",".$_SESSION['userid'].",".abs(intval($_POST['bid'])).")"); //insert bid mysql_query("UPDATE `users` SET `money` = `money` - ".abs(intval($_POST['bid']))." WHERE (`userid` = ".$_SESSION['userid'].")"); //Take cash from user echo ('Your bid has been confirmed. <a href = "/auction.php"><span style = "color:#8B0000">Back to Auction</span></a>'); } } if($Data['BuyNow'] == 0) { $Buy = 'Disabled by user'; }else{ $Buy = number_format($Data['BuyNow']); } if($Data['BuyNow'] == 0) { $Sign = ''; }else{ $Sign = '$'; } echo (' <table class = "table" cellspacing = "1" width = "35%" align = "center" style = "text-align:center"> <form action = "auction.php?page=Bid&ID='.$_GET['ID'].'" method = "post"> <tr> <td width = "25%">Item Name:</td> <td><span style = "color:#8B0000">'.htmlentities($Data['itmname']).'</span></td> </tr> <tr> <td width = "25%">Current Bid:</td> <td>'.number_format($Data['CurrentBid']).'</td> </tr> <tr> <td width = "25%">Buy Now Price:</td> <td>'.$Sign.''.$Buy.'</td> </tr> <tr> <td width = "25%">Enter Bid:</td> <td><input type = "text" name = "bid" value = "0" /></td> </tr> <tr> <td colspan = "2"><input type = "submit" value = "Place Bid" /></td> </tr> </form> </table> <a href = "/auction.php"><span style = "color:#8B0000">Go Back</a>'); $h->endpage(); } function Add() { global $h; $Data = mysql_query("SELECT i.`inv_itemid`,i.`inv_userid`,i.`inv_qty`,it.`itmid`,it.`itmname` FROM `inventory` i LEFT JOIN `items` it ON (i.`inv_itemid` = it.`itmid`) WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".abs(intval($_GET['ID'])).")") or die(mysql_error()); if(!mysql_num_rows($Data) || !ctype_digit($_GET['ID'])) { echo ('An error has occurred, please go back and try again.'); exit($h->endpage()); } $Data = mysql_fetch_array($Data); echo (' <span style = "font-size:2em; font-family:Arial,Helvetica,sans-serif; color:#8B0000">Adding Item To Auction</span> <hr width = "90%"> You have <span style = "color:#8B0000">[i]'.number_format($Data['inv_qty']).'[/i]</span> - <span style = "color:#8B0000">[i]'.htmlentities($Data['itmname']).'[/i]</span> <hr width = "90%">'); if((isset($_POST['time']))) { $One = mysql_query("SELECT `ID` FROM `gAuction` WHERE (`SellerID` = ".$_SESSION['userid'].")"); if(mysql_num_rows($One)) { echo ('Only one item at the auction please.'); exit($h->endpage()); } if(!in_array($_POST['time'], array('1Hour','6Hours','1Day','2Days'))) { echo ('An error has occured please go back and try again.'); exit($h->endpage()); } if($Data['inv_qty'] < 1) { echo ('It seems you don\'t have enough of this item to send it to auction.'); exit($h->endpage()); } if($_POST['time'] === '1Hour') { $time = '3600'; } elseif($_POST['time'] === '6Hours') { $time = '21600'; } elseif($_POST['time'] === '1Day') { $time = '86400'; } elseif($_POST['time'] === '2Days') { $time = '172800'; } mysql_query("INSERT INTO `gAuction` VALUES ('',".$_SESSION['userid'].",".$Data['itmid'].",".abs(intval($_POST['sbid'])).",".abs(intval($_POST['buy'])).",".$time.",unix_timestamp())") or die(mysql_error()); if($Data['inv_qty'] > 1) { mysql_query("UPDATE `inventory` SET `inv_qty` = `inv_qty` - 1 WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".$Data['itmid'].")") OR DIE(MYSQL_ERROR()); }else{ mysql_query("DELETE FROM `inventory` WHERE (`inv_userid` = ".$_SESSION['userid'].") AND (`inv_itemid` = ".$Data['itmid'].")")OR DIE(MYSQL_ERROR()); } echo ('You\'ve successfully add the item to the auction. <a href = "/auction.php"><span style = "color:#8B0000">Click here to View</span></a>'); }else{ echo (' <table border = "0" class = "table" cellspacing = "1" width = "60%" align = "center" style = "text-align:center"> <form action = "auction.php?page=Add&ID='.$_GET['ID'].'" method = "post"> <tr> <td colspan = "2">Select the amount off time you wish your auction to last.</td> </tr> <tr> <td colspan = "2">1 Hour<input type = "radio" name = "time" value = "1Hour" /> 6 Hours<input type = "radio" name = "time" value = "6Hours" /> 24 Hours<input type = "radio" name = "time" value = "1Day" /> 48 Hours<input type = "radio" name = "time" value = "2Days" /></td> </tr> <tr> <td>Starting Bid</td> <td><input type = "text" name = "sbid" value = "0" /></td> </tr> <tr> <td>Buy It Now Price:</td> <td><input type = "text" name = "buy" value = "0" />(Enter 0 to disable)</td> </tr> <tr> <td colspan = "2"><input type = "submit" value = "Add item to auction" /></td> </tr> </form> </table> <a href = "/inventory.php"><span style = "color:#8B0000">Go Back</span></a>'); } $h->endpage(); } ?> Any help is much appreciated! Thanks
-
simple... Instead of all that code go into the db go into the users structor and click edit on the money change 11 to 58, this will allow a number so big icant even read it LOL
-
Basically i will post up here an energy refil function i use in my gym, i would like a little help please to edit this so it refils will, HOWEVER i want the cost to be 1 point per 1% refilled. so if you have 50% will already then it costs 50 points to refil it back to 100%. Here is the code i need edited: if($_GET['refill'] == 'energy') { if($ir['points'] < $set['ct_refillprice']) { echo "You don't have enough points! [url='gym.php']Back to Gym[/url]"; $h->endpage(); exit; } if($ir['energy'] == $ir['maxenergy']) { echo "You already have full energy. [url='gym.php']Back to Gym[/url]"; $h->endpage(); exit; } $RefilEnergy = sprintf("UPDATE users SET energy = maxenergy, points = points - %u WHERE (userid = %u)", $set['ct_refillprice'], $userid); $db->query($RefilEnergy); echo sprintf("You have paid %s points to refil your energy bar. <hr>", number_format($set['ct_refillprice'])); } Much appreciated if anyone can help :D
-
I would like to see another gang wars addition in which when the gang leader goes to declare a war they have to select the time the war will go on for etc: 7 days and this could be on a drop down menu, I would also like it so that a gang has to accept the gang war as on games gangs are just getting destroyed and it is no longer fun to just have a gang, if anyone can code this i would really appreciate it.
-
Hello, i have a paid mod which is an affiliate system, i would like a respected member of MWG to come forward and help us, it seems it was built to fit the old donator system that comes with v2, if someone could integrate it to work with my current donator system that would be greatly appreciated and it is a paid job, please PM me if you think you can do this, however this is a paid mod and transfers of files will happen so someone trusted is needed here, PM me with a price and expected time to finish this.