Jump to content
MakeWebGames

attacklost.php and attackwon.php


assassin32
 Share

Recommended Posts

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]

Link to comment
Share on other sites

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. :|

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
Reply to this topic...

×   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...