Jump to content
MakeWebGames

Recommended Posts

Posted

Hitman 25 asked for something to help limit the attacks on his game. request This might not have been just what ya wanted but here it is. it's what i use and serves its purpose.

I'm sure it could be done better,but it works .Ok here we go.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

ADD this with the others for your new bar:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

next open attack.php . I have added some of my attack file so you can see where to put the if statement

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

in the same file look for:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

ADD this with the others

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then add this to your cron_hour

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

hope this helps ya out.

Posted

Looks good thanks :)

It doesn't stop them from attacking how do i make it work so they can't attack? it just keeps adding 25 over nd over I changed 10 to 25 by the way..

heres my attack.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and heres the link part

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

if($ir['fatigue'] >= 100)

 

If someone has say....13 fatigue

and you +10 each time

it would be over 100.

Erego saying if($ir['fatigue'] == 100)

is saying to deny only if it's equal.

>= should do the trick there.

heck even if($ir['fatigue'] > 99) would work.

Would look better to change the if to else if as well. but not required.

  • 2 weeks later...
Posted

I have another idea on this one. Maybe also set it up so a player can't be attacked more than X amount of times a day. I'm real busy with other mods right now, but if I can find the time, this would be a pretty easy adjustment.

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