Jump to content
MakeWebGames

Recommended Posts

Posted

This was requested from this posting Gang Mod V2

What this mod is

Leaders of the gang can turn off war so other gangs cant declare on them and they cant declare on other gangs, while having the war option OFF...

This has probably been already done, I did not secure this if anything is out of place please feel free to add your own part to this as for I used the original yourgang.php my own gang php is set up differently... Anyhow Here you go Scott and others..

Sql:

[mysql]ALTER TABLE `gangs` ADD `waroption` ENUM( 'Off', 'On' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'Off'; [/mysql]

Open yourgang.php

Find :function gang_staff()

Add:

You're unable to view this code.

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

 

scroll down to function gang_staff_idx()

Find:

Change Gang Tag";

Add under it:

Toggle War Status

 

Find:

You're unable to view this code.

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

 

Replace it With:

You're unable to view this code.

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

 

Find:

$h->endpage();

?>

Above Add:

 

You're unable to view this code.

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

 

open creategang.php and find:

$db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'')");

Replace with:

$db->query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'',Off)");

And that should be all,enjoy!

Posted

Looks good, I'd like to test it but I don't use mccodes anymore.

And I'm not 100% positive, but I think abs(intval()); is more secure.

Not totally sure though.

Other than that looks good, I like the idea

Posted

Thank you, i dont use mccodes either it was just a request from scott, only took 15 minutes to put together was no biggie lol. abs(intval()); could work, I just didnt do any security on it didnt have the time.

  • 2 months later...
Posted

No problem it's really simple to add lol.

Just add this anywhere on the gang.php or whatever page you want it to display on that has gangdata..

if($gangdata['waroption']=="Off"){

echo ' This gang has war option off.';

}

else

{

echo 'This gang has war option on.';

}

Posted

might want to edit crategang.php will cause error

look for

mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'',0,0)",$c) or die(mysql_error());

Change it to

mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'',0,0,'')",$c) or die(mysql_error());

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