News:

i have replaced the indicated code, i have removed the function and added directly the code to the header-pvp case and IT WORKS !!! veeeryyyy nice....
this is the updated avatar module that gives lodge modules, shows them in battle and in pvp and also shows monster pics, master pics, undead pics and any other pics in battle... image extension changeable only by editing the file... there is also a debug message that should be removed after finishing uploading all the needed images... and some more conditions to add and make the module more neat, but that would be every admin's stuff...
Thank you, Nightborn!