ddupuis Posted November 2, 2007 Share Posted November 2, 2007 Ok here is a little bit of code just to stop attacks on staff and players till the reach a specific level. //--- Can't attack staff else if ($odata['user_level'] > 1) { print "You can't attack Staff"; $db->query("UPDATE users SET hp=0 WHERE userid=$userid"); $db->query("UPDATE users SET hospital=5 WHERE userid=$userid"); $h->endpage(); exit; } //--- Can't attack level 1 player. you can change the level if($odata['level'] <= 1) { print "This player is Level one. Give them time to learn. > Back"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 2, 2007 Share Posted November 2, 2007 Re: No Attack put in what file and where? Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted November 2, 2007 Share Posted November 2, 2007 Re: No Attack u add it in attack.php Quote Link to comment Share on other sites More sharing options...
dementor Posted November 2, 2007 Share Posted November 2, 2007 Re: No Attack attack.php where u see all the cant attack in hospital blah blah blah Quote Link to comment Share on other sites More sharing options...
ddupuis Posted November 2, 2007 Author Share Posted November 2, 2007 Re: No Attack sorry guys a am a noob on you forum.. I will try remember that stuff as some people might not know where to place the code and yess it's for the attack.php Quote Link to comment Share on other sites More sharing options...
Klikoka Posted November 4, 2007 Share Posted November 4, 2007 Re: No Attack yup ur learning Quote Link to comment Share on other sites More sharing options...
ignite Posted November 4, 2007 Share Posted November 4, 2007 Re: No Attack If they attack staff you put their energy to zero and put them in hospital for 5 minuets ? Why not just say you can't attack staff Quote Link to comment Share on other sites More sharing options...
Redeye Posted November 7, 2007 Share Posted November 7, 2007 Re: No Attack This idea was on Deep Grave like a year before he posted it, apart from it just stopped the person from attacking Quote Link to comment Share on other sites More sharing options...
Klikoka Posted November 7, 2007 Share Posted November 7, 2007 Re: No Attack the code has been around for ages thats where he prob got it i knew this bout 6Months ago Quote Link to comment Share on other sites More sharing options...
ddupuis Posted November 7, 2007 Author Share Posted November 7, 2007 Re: No Attack It was posted cause someone asked for it and the other one posted does NOT work.. It was also so players can't attack staff... I don't just repost the same things from the site.. In fact i don't use anything from here.. Most things are full of bugs and much simpler to write myself.. just trying to contibute to people who need it.. Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted November 23, 2007 Share Posted November 23, 2007 Re: No Attack It was posted cause someone asked for it and the other one posted does NOT work.. It was also so players can't attack staff... I don't just repost the same things from the site.. In fact i don't use anything from here.. Most things are full of bugs and much simpler to write myself.. just trying to contibute to people who need it.. Yeah. I have to agree with that. I have copies of both codes so I test before I add on here but I'm not sure about other people. Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 24, 2007 Share Posted November 24, 2007 Re: No Attack I'd say that the only time I don't post a code that isn't working would be when trouble shooting or I can't figure a code out when I'm trying to do something. Quote Link to comment Share on other sites More sharing options...
~Spooky~ Posted January 26, 2008 Share Posted January 26, 2008 Re: No Attack been there done that!!!!!!!! Got tired of my coders getting hit when they were online so Latino Heat did this one for me LAST YEAR. Easy for all you new coders. In the attack.php look for where it says you can only attack in same location then add this right below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. this keeps my admins from getting hit, but owners and any player thats baby about getting hit can be added just change the players ID number. If you want staff not hit just change the USERID to USER_LEVEL and your done. THIS is V1 or V2. And also easy for any noob!!!!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted January 27, 2008 Share Posted January 27, 2008 Re: No Attack Spooky... What the hell is up with you. Stop being such a b*tch. If you don't like people asking for help or GIVING help then leave. Try this link: http://www.advercash.net/index.php?ref=jesse60905 It seems to be better suited for you. No human interaction and it makes me money :-D Quote Link to comment Share on other sites More sharing options...
~Spooky~ Posted January 27, 2008 Share Posted January 27, 2008 Re: No Attack DONT CALL ME a B*tch. Im also trying to help and its a smaller code and works. So do me a favor and STFU Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted January 28, 2008 Share Posted January 28, 2008 Re: No Attack Wow... You're just... Scary... Lighten up... This is a support forum. Not a forum to be degraded because you need some help or you want to give some help... Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 13, 2008 Share Posted February 13, 2008 Re: No Attack I just installed this and it works just fine! thats!! :-D Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 14, 2008 Share Posted February 14, 2008 Re: No Attack emm wat about v2 no attack ppl in fed Quote Link to comment Share on other sites More sharing options...
jeeppimp Posted February 14, 2008 Share Posted February 14, 2008 Re: No Attack I think attacking ppl in fed is great especially when they're worth about 5-billion. :-D Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 14, 2008 Share Posted February 14, 2008 Re: No Attack i dont as it means u the game money goes up when someone cheated and didnt earn the money themselves Quote Link to comment Share on other sites More sharing options...
ronhouston2 Posted April 26, 2008 Share Posted April 26, 2008 Re: No Attack I Just tryed this mod it dont work it wont stop a member attacking a staff member and when a member is a levle to or higher it wont let you attack please fix this mod thanks Quote Link to comment Share on other sites More sharing options...
Halo Posted April 28, 2008 Share Posted April 28, 2008 Re: No Attack I Just tryed this mod it dont work it wont stop a member attacking a staff member and when a member is a levle to or higher it wont let you attack please fix this mod thanks ronhouston2 try this: 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...
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.