assassin32 Posted November 22, 2006 Share Posted November 22, 2006 when i bought the jail and hospital mods they came with a text file that had codes to put into these files (attacklost.php and attackwon.php) im not sure where the codes go and in the text file it only says this... Hospital-Attack files. attackwon.php -right above where it prints (you beat "so and so" and stole "this much" money) add this code (note if you have paid version, your file may be a bit different and i can help you find where to put this.) $randnumer= rand(20,30); $hosptime = (int) $randnumer; $loseruser = $r['userid']; $winneruser = $ir['userid']; $winnerusername = $ir['username']; $reasonhosp = 'Attacked by '; $reasonhosp .= '$reasonhosp .= $winneruser; $reasonhosp .= '>'; $reasonhosp .= $winnerusername; $reasonhosp .= '.'; mysql_query("UPDATE users SET hosptime=$hosptime WHERE userid=$loseruser",$c); mysql_query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); attacklost.php -I added this right above where it sends an event telling the winner that he was attacked and lost to. $randnumer=(int) rand(25,40); $hosptime = $randnumer; $loseruser = $ir['userid']; $winneruser = $r['userid']; $winnerusername = $r['username']; $reasonhosp = 'Attacked and lost to '; $reasonhosp .= '$reasonhosp .= $winneruser; $reasonhosp .= '>'; $reasonhosp .= $winnerusername; $reasonhosp .= '.'; mysql_query("UPDATE users SET hosptime=$hosptime WHERE userid=$loseruser",$c); mysql_query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); can somebody please show me where to add these codes? :? [email protected] Quote Link to comment Share on other sites More sharing options...
assassin32 Posted November 22, 2006 Author Share Posted November 22, 2006 Re: attacklost.php and attackwon.php sorry i forgot to say im usen the paid verion of mccodes (MonoCountry Source Codes Version 1.1) :-D Quote Link to comment Share on other sites More sharing options...
seanybob Posted November 22, 2006 Share Posted November 22, 2006 Re: attacklost.php and attackwon.php hmmm... this code looks vaguely familiar to one of my earlier versions of my hosp mod... yet i dont remember selling it to you :? :? :? Quote Link to comment Share on other sites More sharing options...
assassin32 Posted November 22, 2006 Author Share Posted November 22, 2006 Re: attacklost.php and attackwon.php iv had the codes for awhile now i just never got around to maken a game, iv been very busy the past few months Quote Link to comment Share on other sites More sharing options...
awakenedlands.com Posted November 22, 2006 Share Posted November 22, 2006 Re: attacklost.php and attackwon.php hmmm... this code looks vaguely familiar to one of my earlier versions of my hosp mod... yet i dont remember selling it to you :? :? :? Not saying he stole it or not, but it's not surprising to me that if you sell code to one player soon everyone will have it without you getting props or cash for it. That just seems to be the community here. :| Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.