Jump to content
MakeWebGames

Recommended Posts

Posted

I did a search but did not find this:

I would like the hospital and jail time to be standard for no matter what the reason. Say like 20 minutes...where do I find this in the code. Is it in the global file (version 2 by the way)

Posted

Re: Hospital/Jail Time v2

The values for them are in different pages.

For jail you can just set it in the staff panel when making the crime.

for hospital their are a few pages to edit.

attackwon.php, attacklost.php, attackhospital.php files like taht..

Posted

Re: Hospital/Jail Time v2

 

how much time does this mean?

 

$hosptime=rand(20,40)+floor($ir['level']/8);

 

It is not an exact amount. You can replace this part

rand(20,40)+floor($ir['level']/8);

with an exact amount if you like.

Posted

Re: Hospital/Jail Time v2

 

how much time does this mean?

 

$hosptime=rand(20,40)+floor($ir['level']/8);

 

rand() generates a random value in between the 2 elements

so lets say it generates a result of 30

floor() rounds down decimal values

now lets say you are level 4

so 4/8 = 0.5

now floor(0.5) will return 0

that is going to produce a final result

$hosptime = 30+0

$hosptime = 30

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.

×
×
  • Create New...