Uridium Posted December 11, 2009 Posted December 11, 2009 The following 3 updates will allow a better Visual of Failed and Successful Events for Gang Crimes + Users will be sent an event of failed or successful Crimes.. and also a big thankyou to Magictallguy for his Very kind Addition so you can now see Which users are in which Warbase The image below is a view from the gang panel for Crime events SCRIPT for the above..... open cron_hour.php and over write from <?PHP to the end } anything after the final } should be added from your own script... IF youve made amendmets You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now add these SQLS,,, [mysql]CREATE TABLE IF NOT EXISTS `gangcrimefailevents` ( `gevID` int(11) NOT NULL auto_increment, `gevGANG` int(11) NOT NULL default '0', `gevTIME` int(11) NOT NULL default '0', `gevTEXT` text NOT NULL, PRIMARY KEY (`gevID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; [/mysql] and [mysql]CREATE TABLE IF NOT EXISTS `gangcrimesucevents` ( `gevID` int(11) NOT NULL auto_increment, `gevGANG` int(11) NOT NULL default '0', `gevTIME` int(11) NOT NULL default '0', `gevTEXT` text NOT NULL, PRIMARY KEY (`gevID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; [/mysql] now open yourgang.php and add this case You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And further down where the gang_index fundtion is add this to the links.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. now create a new FUNCTION before the staff section You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And thats it for that part.... The Below image is the NEWER layout of your WARS.. This will make it easier to locate and attack people in your warbase. if a user is in hospital or Jail then the ATTACK will change to Unavailable for that player..... For this part to work heres the script.... Create a new CASE You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And before the case change the URL for the Your gang is currently in so the URL is <a href='yourgang.php?action=wargroups'> Now add this function AFTER where the gang_warview function ends You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And your done Once i get all my edits together i will Post the script for the EVENTS first and then the WARBASE addition.... Quote
Uridium Posted December 11, 2009 Author Posted December 11, 2009 Quick update whilst im still messing with the gangs GANG CRIMES now have a random time so not all Gang times will be the same EXAMPLE 24 some crimes will take less than 24 hours and some may even take the full 24 hours to complete but will never go below 5 hours for a crime to start Open yourgang.php and look for the function gang_staff_orgcrimes and iverwrite with this one You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. if you have made edits to your own Function be sure to add them back in $randtime amounts can be changed to suit your game Quote
Mcfarlin Posted December 11, 2009 Posted December 11, 2009 nice one illusions. but i used this to add to the warview itself. Added [mysql]echo "<h3>Gang War Members</h3>"; print "<table cellspacing='1' class='table'>"; echo "<tr>"; echo "<th>Gang</th>"; echo "<th>User</th>"; echo "<th>Level</th>"; echo "<th>Days In Gang</th>"; echo "<th>ACTION</th>"; echo "</tr>"; $select = sprintf( "SELECT gw.warTIME, g.gangID, g.gangNAME, u.userid, u.username, u.hospital, u.jail, u.level, u.daysingang " . "FROM gangwars gw " . "LEFT JOIN gangs g ON ((gw.warDECLARER = g.gangID) OR (gw.warDECLARED = g.gangID)) " . "LEFT JOIN users u ON (g.gangID = u.gang) " . "WHERE ((gw.warDECLARER = %1\$u) OR (gw.warDECLARED = %1\$u)) AND (g.gangID != %1\$u) " . "ORDER BY g.gangID ASC", $gangdata['gangID']); $query = $db->query($select); while($r = $db->fetch_row($query)) { echo "<tr>"; echo sprintf("<td>%s</td>", stripslashes(htmlspecialchars($r['gangNAME']))); echo sprintf("<td>%2\$s [%1\$u]</td>", $r['userid'], stripslashes(htmlspecialchars($r ['username']))); echo sprintf("<td>%s</td>", number_format($r['level'])); echo sprintf("<td>%s</td>", number_format($r['daysingang'])); echo sprintf("<td>%s</td>", (!$r['jail'] && !$r['hospital']) ? sprintf("Attack", $r['userid']) : "<span style='color:#444;'><font color='red'>Unavailable</font></a>"); echo "</tr>"; } echo "</table> > Back"; } [/mysql] to the warview function and left the link as it was Quote
Uridium Posted December 11, 2009 Author Posted December 11, 2009 Thanks for the Update Mcfarlin much Appreciated :) +10 Quote
Mcfarlin Posted December 11, 2009 Posted December 11, 2009 glad to contribute where i can, i have learned a tone from MWG forums. least i can do is give what little i know how to give back. thx :thumbup: for the plus 10 lol Quote
Nicholas Posted December 13, 2009 Posted December 13, 2009 lol i only just fixed my cron_hour.php for gang crime events and then this came out... but still thx for the update :) Quote
Smokey Posted September 9, 2011 Posted September 9, 2011 I'm using this and it works ok, but for some reason its inserting the successful crime into the gang events twice. Quote
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.