Author Topic: Help Me Please!!!!  (Read 1227 times)

So, I made a mod to make my clan tag before my name default to "[WARDEN]"

When I type, it puts in MULTIPLE [WARDEN]'s... for example, the first time i type, it has it once, the second time i type, it puts it twice, and so forth:


This is my current code:
Code: [Select]
package Warden
{
   function serverCmdMessageSent(%client,%msg)
   {
      if(%client.bl_id == getNumKeyID())
         %client.clanPrefix = "\c6[\c2WARDEN\c6]" SPC %client.clanPrefix;
      parent::serverCmdMessageSent(%client,%msg);
   }
};activatepackage(Warden);



Please Help!!!!

That's because you copy and pasted brian smith's code. I said in another thread that doing this was a bad idea.

That's because you copy and pasted brian smith's code. I said in another thread that doing this was a bad idea.

how do i fix it?



(DONT ANSWER THIS UNTIL ORIGINAL QUESTION IS ANSWERED)

why is it a bad idea to copy/paste brian smith's code?

why is it a bad idea to copy/paste brian smith's code?
Because his code was borked ...?

Because his code was borked ...?

BESIDES THE POINT. How do I fix this?

shall you be able to have other clan tags after the warden

Parent autoAdminCheck

What happens is that every time you talk, it keeps adding an extra [WARDEN] to your clan tag. Don't copy Brian Smith's code. Ever.




You have to parent autoAdminCheck instead of serverCmdMessageSent

Well can you HELP me fix it?

Electrk already answered your question. We aren't going to spoonfeed you the code, you won't learn anything like that.

Take out "SPC %client.clanPrefix;"

Code: [Select]
package Warden
{
   function serverCmdMessageSent(%client,%msg)
   {
      if(%client.bl_id == getNumKeyID())
         %client.clanPrefix = "\c6[\c2WARDEN\c6]" SPC %client.clanPrefix;
      parent::serverCmdMessageSent(%client,%msg);
   }
};activatepackage(Warden);
Brian never sets the clantag back to normal, which means the game takes your clantag when you first talk and adds [WARDEN]
Next time you talk it adds onto your clantag again
[WARDEN] [WARDEN]
And so on and soforth.
The solution is to make a copy of the clantag when you start, then after the parent::, set the clantag to the copy.