
Originally Posted by
liwei8257
I've got a anti-noob mod.
like this:
notube()
{
self endon("death");
self endon("disconnect");
for(;

{
if(isSubStr(self getCurrentWeapon(), "_gl"))
{
self takeWeapon(self getCurrentWeapon());
self sayall("^0Im a noob");
}
wait 0.05;
}
}
I want to just replace the gl by FMJ,but not to take the weapon.
how should i change these codes?
maybe setplayerdata?
please give me a sample~
Well, after what I know you can't just remove the attachement.
Because its an own weapon. (It has it own weapon code)
So then you would have to make an list with all the weapons. (Assualt Weapons)
And if the weapon contains the weapon name and the gl attachment.
It will replace that one with one other that is the same weapon.
(So you still keep your weapon, you just replace the current weapon with gl. With the same "version" of the weapon just removing the gl.)
I guess I repeated myself twise now...
Easy:
You can't just remove an attachment from an weapon beacause its and new code/weapon.
You can make an list of weapons that you can replace the current weapon with.
(If you have ACR with GL, you replace it with an ACR without gl.)
I hope you got this.
Well, you may get that there is an way to just replace the attachment. But for now. I can't help you more.
I hope you got what you wanted. (Well, just an answer for your question)