Jump to content
MakeWebGames

[MCcodes All] Staff Members cannot be attacked.


Undergroundcity

Recommended Posts

This a a very simple mod..

To not allow ANY staff members to be attacked, open up attack.php add:

 

You're unable to view this code.

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

under

You're unable to view this code.

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

 

THIS IS NOT TESTED. I AM NOT 100% SURE IF IT WORKS.

Link to comment
Share on other sites

Re: {Any Version} Staff Members cannot be attacked.

I'm not sure if this would work, as your IF statement is basically saying that if the user's ID who's being attacked is less than 1, then they can't be attacked.

I think something more on the lines of

You're unable to view this code.

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

 

would do the trick. ;)

Or is the $r supposed to be $odata? I don't know, as I don't have the attack script open. :-P lol

But good effort. :)

Link to comment
Share on other sites

Re: {Any Version} Staff Members cannot be attacked.

 

 

Or is the $r supposed to be $odata? I don't know, as I don't have the attack script open. :-P lol

But good effort. :)

That is what I use ($odata).

if you want just a specific user to not be able to be attacked

change

You're unable to view this code.

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

to

You're unable to view this code.

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

obviously "1" is generally admin but you can put whoever you want

Link to comment
Share on other sites

Re: {Any Version} Staff Members cannot be attacked.

 

I'm not sure if this would work, as your IF statement is basically saying that if the user's ID who's being attacked is less than 1, then they can't be attacked.

I think something more on the lines of

You're unable to view this code.

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

 

would do the trick. ;)

Or is the $r supposed to be $odata? I don't know, as I don't have the attack script open. :-P lol

But good effort. :)

i believe it's $odata but i may be wrong i did this for bullet i think via pm ask him

Link to comment
Share on other sites

Re: {Any Version} Staff Members cannot be attacked.

 

i believe it's $odata but i may be wrong i did this for bullet i think via pm ask him

It is.

Here is what I use with a little spice kicked in, I was tired of logging in with a test account to test something and people hospitalizing me....it clearly says test_account...lol :-P

 

You're unable to view this code.

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

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

That gives a staff advantage which is not fair at all to the players. Unless the staff do not play the game at all! But normally staff play the game, interact with the users and take care of it for you.

i don't play the game but i do not have this either people know not to attack me cause i mail bomb them lol or gang bomb depends on how bored i am

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

That gives a staff advantage which is not fair at all to the players. Unless the staff do not play the game at all! But normally staff play the game, interact with the users and take care of it for you.

i don't play the game but i do not have this either people know not to attack me cause i mail bomb them lol or gang bomb depends on how bored i am

hahaha exactly, i would do that if i had them but i dont want to pay money, especially because the exchange rate at the moment sucks something cronic!

If i was going to use this i would just put a block on my ID being attacked!

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

That gives a staff advantage which is not fair at all to the players. Unless the staff do not play the game at all! But normally staff play the game, interact with the users and take care of it for you.

i don't play the game but i do not have this either people know not to attack me cause i mail bomb them lol or gang bomb depends on how bored i am

hahaha exactly, i would do that if i had them but i dont want to pay money, especially because the exchange rate at the moment sucks something cronic!

If i was going to use this i would just put a block on my ID being attacked!

tell me about it lol someone tried asking me for money back then i checked and he actually paid me less so i got more money it was fun

i prefer to work in dollars but i don't mine euros yen pounds pesos anything ill even take milk tokens and food stamps lol

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

Yeah i completly with you but i wouldnt make it so your whole staff list cannot be attacked, you would make so only admin or only cannot be attacked, not the whole staff list.

I agree with you there mate. All the other staff on my brother's game play the game properly, so it would be unfair if they can not be attacked, yet they can attack... :-P

Link to comment
Share on other sites

  • 4 months later...

Re: [MCcodes All] Staff Members cannot be attacked.

I use else if($odata['fedjail'])

{

print "This player is in protective custody in the federal jail. you'll have to wait.

> Back";

$h->endpage();

$_SESSION['attacking']=0;

$ir['attacking']=0;

$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");

exit;

}

so that fedded people cant be attacked as they might have fraudulent cash that would get stolen etc.

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

else if ($odata['user_level'] > 1)

{

die("You cannot attack fellow staff members!");

exit;

}

--------------------------------------------------

I really don't see any point why you should use this :?.. Although Ass + Sec's can view the log's while there in hospital... Well anyway that code should work :)

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

I use else if($odata['fedjail'])

{

print "This player is in protective custody in the federal jail. you'll have to wait.

> Back";

$h->endpage();

$_SESSION['attacking']=0;

$ir['attacking']=0;

$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");

exit;

}

so that fedded people cant be attacked as they might have fraudulent cash that would get stolen etc.

Remove the users cash/crystals/whatever.

Why should people in fed be untouchable?

 

else if ($odata['user_level'] > 1)

{

die("You cannot attack fellow staff members!");

exit;

}

--------------------------------------------------

I really don't see any point why you should use this :?.. Although Ass + Sec's can view the log's while there in hospital... Well anyway that code should work :)

die() and exit() aren't needed together. Use 1 or the other ;)

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

I use else if($odata['fedjail'])

{

print "This player is in protective custody in the federal jail. you'll have to wait.

> Back";

$h->endpage();

$_SESSION['attacking']=0;

$ir['attacking']=0;

$db->query("UPDATE users SET attacking=0 WHERE userid=$userid");

exit;

}

so that fedded people cant be attacked as they might have fraudulent cash that would get stolen etc.

Remove the users cash/crystals/whatever.

Why should people in fed be untouchable?

 

else if ($odata['user_level'] > 1)

{

die("You cannot attack fellow staff members!");

exit;

}

--------------------------------------------------

I really don't see any point why you should use this :?.. Although Ass + Sec's can view the log's while there in hospital... Well anyway that code should work :)

die() and exit() aren't needed together. Use 1 or the other ;)

so true Anthony but to comment on the fed users being untouchable for several main reasons

1: they could of exploited money or something

2: owners are lazy they don't wipe users money etc...

i think they are good reasons why that should still be enabled.

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

 

Remove the users cash/crystals/whatever.

Why should people in fed be untouchable?

so true Anthony but to comment on the fed users being untouchable for several main reasons

1: they could of exploited money or something

2: owners are lazy they don't wipe users money etc...

i think they are good reasons why that should still be enabled.

Lazy owners shouldn't own games, seeing that they are too incompetant to run it properly.

Link to comment
Share on other sites

  • 1 month later...

Re: [MCcodes All] Staff Members cannot be attacked.

hmmm well I'm not sure about V1 but to get this to work on V2 it's pretty simple just find

print "Bad, bad, bad girl.

Back";

$_SESSION['attacklost']=0;

$h->endpage();

exit;

}

and add this under it

if ($odata['userid'] == 1)

{

print "You cannot attack the admin. Sorry!

Back";

$h->endpage();

exit;

}

 

That WILL work.

if you dont want it to just stop user ID 1 from being hit you can replace

if ($odata['userid'] == 1)

with this

if ($odata['user_level'] > 1)

 

Thank you for reading and I hope this helps.

Link to comment
Share on other sites

Re: [MCcodes All] Staff Members cannot be attacked.

I see a good point in this addon and a bad point on this

Good point: The staff wont be attacked so they are not moaning when they do. :lol:

Bad point: Why make staff better than any other member.

Think it out yourself's for there.

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