Undergroundcity Posted November 18, 2008 Share Posted November 18, 2008 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. Quote Link to comment Share on other sites More sharing options...
War_Hero Posted November 18, 2008 Share Posted November 18, 2008 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. :) Quote Link to comment Share on other sites More sharing options...
spazz Posted November 18, 2008 Share Posted November 18, 2008 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 Quote Link to comment Share on other sites More sharing options...
The Ace Posted November 18, 2008 Share Posted November 18, 2008 Re: [MCcodes All] Staff Members cannot be attacked. Scratch what I said... Ggl. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted November 19, 2008 Share Posted November 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
spazz Posted November 19, 2008 Share Posted November 19, 2008 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. Quote Link to comment Share on other sites More sharing options...
radio_active Posted November 19, 2008 Share Posted November 19, 2008 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. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted November 19, 2008 Share Posted November 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
radio_active Posted November 19, 2008 Share Posted November 19, 2008 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! Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted November 19, 2008 Share Posted November 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
War_Hero Posted November 19, 2008 Share Posted November 19, 2008 Re: [MCcodes All] Staff Members cannot be attacked. :) On my brother's game, we have it so myself and him can't be attacked, so we can test new mods, sort out player issues, etc. We've also made it so we get an event if someone tries to attack us. :-P lol Quote Link to comment Share on other sites More sharing options...
Undergroundcity Posted November 19, 2008 Author Share Posted November 19, 2008 Re: [MCcodes All] Staff Members cannot be attacked. Thats exactly what I am saying. It gets annoying when your trying to test the game, fix bugs, etc and random people attack you. Quote Link to comment Share on other sites More sharing options...
radio_active Posted November 19, 2008 Share Posted November 19, 2008 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. Quote Link to comment Share on other sites More sharing options...
War_Hero Posted November 19, 2008 Share Posted November 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
mentaljason Posted April 13, 2009 Share Posted April 13, 2009 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. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted April 13, 2009 Share Posted April 13, 2009 Re: [MCcodes All] Staff Members cannot be attacked. one way people would know not to attack staff if you dont have any haha :evil: Quote Link to comment Share on other sites More sharing options...
yaz123 Posted April 13, 2009 Share Posted April 13, 2009 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 :) Quote Link to comment Share on other sites More sharing options...
POG1 Posted April 14, 2009 Share Posted April 14, 2009 Re: [MCcodes All] Staff Members cannot be attacked. why not just use ['user_level'] == 2 Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted April 15, 2009 Share Posted April 15, 2009 Re: [MCcodes All] Staff Members cannot be attacked. why not just use ['user_level'] == 2 pog1 it's staff members not just admins mate Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted April 15, 2009 Share Posted April 15, 2009 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 ;) Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted April 15, 2009 Share Posted April 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted April 15, 2009 Share Posted April 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted April 15, 2009 Share Posted April 15, 2009 Re: [MCcodes All] Staff Members cannot be attacked. i totally agree but they most are lazy or immature and sometimes even both. Quote Link to comment Share on other sites More sharing options...
ChrisJonesCJ Posted May 26, 2009 Share Posted May 26, 2009 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. Quote Link to comment Share on other sites More sharing options...
eido Posted May 26, 2009 Share Posted May 26, 2009 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.