Jump to content
MakeWebGames

Newbie and Staff protection


Recommended Posts

it should be

you have to use && (AND) instead of || (OR) when checking to see if a number is inbetween 2 numbers

Then the only people protected would be staff under level 5...

@ op - make sure it's under the query (e.g. under the if() that checks if the player you're attacking is in hosptail).

Edited by Dominion
Link to comment
Share on other sites

it should be
if($odata['user_level'] > 1 && $odata['level'] < 5)
{
   echo 'Tou can\'t attack staff members or members under level 5!';
   die($h->endpage());
}

 

you have to use && (AND) instead of || (OR) when checking to see if a number is inbetween 2 numbers

its not working :(

Link to comment
Share on other sites

it should be
if($odata['user_level'] > 1 && $odata['level'] < 5)
{
   echo 'Tou can\'t attack staff members or members under level 5!';
   die($h->endpage());
}

 

you have to use && (AND) instead of || (OR) when checking to see if a number is inbetween 2 numbers

No, It really shouldnt.

Link to comment
Share on other sites

i add it to attack.php , there are no error but its not working.I can still attack players level under 5 and staffs

Thats because what he said was wrong.

Juding that you are using the original McCodes, I see no reason why dom's didnt work. I suppose you could try adding extra parentheses.. :/ Mabey something like;

if(($odata['user_level'] != (0||1)) || ($odata['level'] < 5))  {
   echo 'You can\' attack staff members and/or members under level 5';
   die($h->endpage());
}
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.

×
×
  • Create New...