Jump to content
MakeWebGames

Add images when you attack


Uridium

Recommended Posts

This mod will allow you to upload an image for the sole use that it will be displayed when someone clicks on Attack. You will see your Image + that of your Opponents very small has no real purpose but it brings fun to the game.

call this file attackimageuploader.php

 

You're unable to view this code.

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

 

 

Now open up Preferences.php

and add this line somewhere on the print preferences

 

You're unable to view this code.

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

 

 

Now open up attack.php

Scroll down to the bottom where the print"</table>"; and after it over write with this one

 

You're unable to view this code.

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

 

 

Create a Folder on your FTP called attpics then add this to your MSQL

You're unable to view this code.

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

I'll post a screenie its not brilliant but i hate tables but the pics show up at least..

test.png

Link to comment
Share on other sites

Re: [MOD] V2 Add images when you attack

This is a very nice piece of work which im going to use for the time being when i have not many members signed up to my game...

But suppose you have 1000 people who all upload an image, your DB is gonna fill up unless you have a large plan. Would be better to use a URL instead of uploading, thats how i see it but i like it... :-)

Link to comment
Share on other sites

Re: [mccode v2] Add images when you attack

if you would prefer to use the display_pic rather than the attpics then use the script below for the attack.php you will need the display pic uploader already installed for this to work however,,,

 

You're unable to view this code.

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

Link to comment
Share on other sites

Re: [mccode v2] Add images when you attack

 

if you would prefer to use the display_pic rather than the attpics then use the script below for the attack.php you will need the display pic uploader already installed for this to work however,,,

 

You're unable to view this code.

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

 

Much Better :-P

Link to comment
Share on other sites

Re: [mccode v2] Add images when you attack

Just a small update for those using the attpics mod seeing as NPC's cant upload thier own image and it was driving me mental to find a cure..

Decepti0n kindly posted the fix for it

Upload a default.jpg to your attpics folder this will be used by the NPCS

goto your PHPMYADMIN and run this SQL

update users set attpics = 'default.jpg' where user_level = 0

And if your just nistalling this it would be wise also to give members a pic so upload a pic call it nomemb.jpg or what ever..

and run this SQL

update users set attpics = 'default.jpg' where user_level = 1

You can do the same for Staff if they dont have an image to share.

Link to comment
Share on other sites

Re: [mccode v2] Add images when you attack

 

if you would prefer to use the display_pic rather than the attpics then use the script below for the attack.php you will need the display pic uploader already installed for this to work however,,,

 

You're unable to view this code.

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

 

This didnt work for me i thought i would post the one that worked for me

 

 

You're unable to view this code.

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

 

All i did was removed the displaypic/ from

 

You're unable to view this code.

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

 

And it worked

THanks guys

Link to comment
Share on other sites

Re: [mccode v2] Add images when you attack

Small update I noticed when Attacking that the wrong users health bar was depleating so heres the fix...

find

print "</table">;

add below

 

You're unable to view this code.

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

 

Again if your using your Profile images and not the attck images then alter accordingly .

Link to comment
Share on other sites

  • 3 weeks later...

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