iseeyou94056 Posted November 11, 2007 Share Posted November 11, 2007 i dont know how most people do it but this is how i do it in your brave or energy cron add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and it should run that every 5 min or so if after it run there is a gang with 0 respect it will delete it and problems post here Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted November 11, 2007 Share Posted November 11, 2007 Re: delete gang after respect hit 0 i dont know how most people do it but this is how i do it in your brave or energy cron add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and it should run that every 5 min or so if after it run there is a gang with 0 respect it will delete it and problems post here There is no `gangID` column in users. Also, this wont delete gang wars. I use this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Tested and works fine, Mines in daily cron though, This way it wont have to check the DB as much. This one will also clear gang wars. Quote Link to comment Share on other sites More sharing options...
Godfather Posted November 14, 2007 Share Posted November 14, 2007 Re: delete gang after respect hit 0 well his works so stop critising his work Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted November 14, 2007 Author Share Posted November 14, 2007 Re: delete gang after respect hit 0 :) Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted November 15, 2007 Share Posted November 15, 2007 Re: delete gang after respect hit 0 well his works so stop critising his work How can iseeyou94056's one work, If there is no gangID in users table? Its common sense... Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted November 16, 2007 Share Posted November 16, 2007 Re: delete gang after respect hit 0 Wow... awesome mod. :D Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted November 16, 2007 Author Share Posted November 16, 2007 Re: delete gang after respect hit 0 sorry for messin up Quote Link to comment Share on other sites More sharing options...
~Spooky~ Posted January 26, 2008 Share Posted January 26, 2008 Re: delete gang after respect hit 0 Iseeyou has been coding for year and think hes doing a good job. So what if he missed the wrong qurey. I was the one who gave him the cron to delete the gangs after zero, but it was cron. He made it possible for it to work in the files. LostOne thanks was looking for better way of doing gang delete after zero instead of the cron way. Both work so HUSH I got flipping headache from all the bitching Quote Link to comment Share on other sites More sharing options...
Tonka Posted February 3, 2008 Share Posted February 3, 2008 Re: delete gang after respect hit 0 so which is the best one to use? Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted February 4, 2008 Author Share Posted February 4, 2008 Re: delete gang after respect hit 0 the one from Isomerizer Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted February 4, 2008 Share Posted February 4, 2008 Re: delete gang after respect hit 0 the one from Isomerizer Well LostOne's as it will delete all gangs with no respect, mine will only delete one as its not looping. Quote Link to comment Share on other sites More sharing options...
Godhand Posted February 4, 2008 Share Posted February 4, 2008 Re: delete gang after respect hit 0 Better idea run it in attack.php and just do sql to delete the ones that have negative or 0 respect. or do something like detecting if they are a member of a gang and if they are then make it run the coding otherwise make it not include it. Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted February 22, 2008 Author Share Posted February 22, 2008 Re: delete gang after respect hit 0 can u post one like that Quote Link to comment Share on other sites More sharing options...
Godhand Posted February 23, 2008 Share Posted February 23, 2008 Re: delete gang after respect hit 0 I can't be bothered to as gangs are not a big hit in my game. Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 26, 2008 Share Posted February 26, 2008 Re: delete gang after respect hit 0 anyone have a working v2 one Quote Link to comment Share on other sites More sharing options...
Godhand Posted February 27, 2008 Share Posted February 27, 2008 Re: delete gang after respect hit 0 I'll give the basic set up though You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If clauses are very useful. Another way to write this coding wise is You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I think it requires the 'gang' for it.... I'm not 100% sure. But thats the basic format. Both [red]SHOULD[/red] work Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted February 27, 2008 Share Posted February 27, 2008 Re: delete gang after respect hit 0 I'll give the basic set up though You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If clauses are very useful. Another way to write this coding wise is You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I think it requires the 'gang' for it.... I'm not 100% sure. But thats the basic format. Both [red]SHOULD[/red] work Your second IF Statement won't work. It should look like 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...
Godhand Posted February 27, 2008 Share Posted February 27, 2008 Re: delete gang after respect hit 0 I have a similar query working. But it sets up the point at least. Theres an easy way to code it all in 1 swoop. Heh. Quote Link to comment Share on other sites More sharing options...
toufail Posted October 28, 2008 Share Posted October 28, 2008 Re: [mccode] delete gang after respect hit 0 anyone have a working v2 one Quote Link to comment Share on other sites More sharing options...
Strats Posted July 11, 2009 Share Posted July 11, 2009 Re: delete gang after respect hit 0 i dont know how most people do it but this is how i do it in your brave or energy cron add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and it should run that every 5 min or so if after it run there is a gang with 0 respect it will delete it and problems post here There is no `gangID` column in users. Also, this wont delete gang wars. I use this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Tested and works fine, Mines in daily cron though, This way it wont have to check the DB as much. This one will also clear gang wars. When you say clear gang wars do you mean the clear gangs that wared the "0 respect" gang I hope you understand that Quote Link to comment Share on other sites More sharing options...
boogieman313 Posted January 9, 2010 Share Posted January 9, 2010 Does anyone have a working one for v2? I have gangs with negative respect at the moment :wacko: Quote Link to comment Share on other sites More sharing options...
jds137 Posted January 9, 2010 Share Posted January 9, 2010 "$gangs=$db->query("SELECT * FROM gangs WHERE gangRESPECT<=0"); while($gang=$db->fetch_row($gangs)) { $delete=$gang['gangID']; $db->query("DELETE FROM gangwars WHERE warDECLARER=$delete OR warDECLARED=$delete"); $db->query("DELETE FROM gangs WHERE gangRESPECT<=0"); $db->query("UPDATE users SET gang='0' WHERE gang=$delete"); }" Quote Link to comment Share on other sites More sharing options...
BludClart Posted January 10, 2010 Share Posted January 10, 2010 Yu i dont know how most people do it but this is how i do it in your brave or energy cron add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and it should run that every 5 min or so if after it run there is a gang with 0 respect it will delete it and problems post here There is no `gangID` column in users. Also, this wont delete gang wars. I use this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Tested and works fine, Mines in daily cron though, This way it wont have to check the DB as much. This one will also clear gang wars. p this should work ;) BUT this one...made by iseeyou94056 wont work because its calling for a resource XD i dont know how most people do it but this is how i do it in your brave or energy cron add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and it should run that every 5 min or so if after it run there is a gang with 0 respect it will delete it and problems post here $gang=mysql_query("SELECT gangID FROM gangs WHERE gangRESPECT<0"); = ANY of the ids for the gangs with 0 respect mysql_query("UPDATE users SET gang=0 WHERE gangID=$gang",$c); = ERROR :P mysql_query("UPDATE users SET gang=0 WHERE gang=$gang",$c); = UPDATE nothing XD $norespect=mysql_query("SELECT gangID FROM gangs WHERE gangRESPECT<0"); = ANY of the ids for the gangs with 0 respect while($gang=mysql_fetch_row($norespect)) { mysql_query("UPDATE users SET gang=0 WHERE gang=$gang",$c); } but still you need to delete the gang wars aswell :P infact anything to do with the gang XD Quote Link to comment Share on other sites More sharing options...
CrazyT Posted January 11, 2010 Share Posted January 11, 2010 Damn. While loop and selecting and deleting all in one wow. What say if there was 100 gangs or what ever with 0 respect. Means your going to do 100 select queries and 100 delete queries. So why not just run two or three? Simple.. Select the rows put them into an array then use MySQL IN ( ) and php implode( ). And your done. :D Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted January 13, 2010 Share Posted January 13, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Would work fine, if you want to delete and update all systems concerned.. 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.