Jump to content
MakeWebGames

Recommended Posts

Posted

Hy all, i`m not so god at modding, and so i ask for your help if you want to give it offcourse :)

I`ve searched on all topics and i didn`t find a mod that restrict players from attacking another player being 3 levels lower than the attacker,

IF there is one can please someone give the link ?

If not could anyone try to make this ?

Thanks,

Posted

Re: [MCCODES v2] Attack restriction

if (abs($ir['level'] - $r['level']) > 3) { sorry you can hit that player }

this works both ways... either more than 3 levels higher, or more than 3 levels lower

Posted

Re: [MCCODES v2] Attack restriction

I dont work with mccodes and I am not experienced in coding but here my shot at it,

 

You're unable to view this code.

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

 

What this should do is stop you attacking someone 3 levels below you, add this to attack.php along with the other if statments. Hope this helps you!

[EDIT 17:04]

Looks like litium beat me to it and is using abs nice 1.

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