Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

Hi,

I have created a simple mug mod where users can mug other players for some of there money.

This mod should work for both MCCodes V.1, and V.2.

NOT WORKING DUIE TO FORUM SWITCHOVER!

Edited by Kieran-R
Posted

Nice work!

One question: how does this differ from the MCCodes base attack script, which already has a mug feature on it?

I assume yours works without the need to attack? Which is much better imo. If this is the case, I will have to use it :P

Posted

For a mod like this, it's a matter of KBs between a file with the identation and a file without. So it wouldn't have much of an effect, really....maybe on a bigger mod, yeah, but not on one this size. :)

Posted

It depends on the size of the indent. :)

But you've just gone against your original point....indentation in this form hardly makes a difference in file size, and it make it easier to read the script. I always indent my code, but maybe not as much as this. :)

Posted
Actually each indent = 1 byte, so its actually a matter of bytes fr a mod this small and simple.

Or you compress your code and it wouldn't matter.

Posted

Or cut n paste the free code and remove the indents if your that bothered and cant sleep lol

select userid,username,location,money,jail,hospital

would be much better than select *

Well done. Nice simple I would add lots more to it but depends on your game!

Posted

Well done look's like a good modification, Keep up the good work!

 

Note: Feel free to space your code as much as you like it's your modification! If they don't like it, then they can create their own... :)

Posted

Danny: a code without indent is barely readable and shows amateur styles normally. The number of byte your source is have little to no effect on the performances, that's why for example functions should be commented at least if not reach the 30% or 50% of your overall code. Yes I know this is not the McCode standard but this is how it should be.

Why I say it have little effect? Because PHP is in the worse case a 2 pass interpreted language which means on the first pass the code is transformed into a more compact / checked form which can be either represented as "byte code" or "expression tree" depending who develop the parser and who describe it ;)

The second pass the byte code or expression tree is run (so a for loop or any other thing will run actually with this second form not the original source). This intermediate state can be stored either in ram or on disk and that's what all php accelerator do at least. The first pass removes all those space, comments and much more. So once this pass is done your comments or indent will have no effect. Yet how much effect it has on the first pass? Again little to nothing, you may try by yourself and I doubt you will see any effect.

Posted

I agree with what ever he said above ;)

And kieran I think your Indents look nice i can see every { and } very clearly without having to rummage through to spot them nicely done.

have a look at the attachment you'll see what i mean :)

Posted

Thanks for the comments.

I use notepad ++ to make mods and it does make it alot easier to look over, and change things within the code with the tab spacing which I use. Im really not sure if it would make a difference to the performance, but if it does, then simply remove the tab spacing to your liking. :)

Posted

Some indention annoys me as people do it to look “more professional” when in fact there is just no constancy to it at all. This is not all that bad. Not looked at the mod itself, but the indention does not look bad. :P

Always nice to see people posting free mods. :)

Posted
Yes it does, but i think you've over done it :)

He's using the standard 4 space tab indent, which is what a lot of people including myself use, there is no problem...

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