Author Topic: Someone please fix this!  (Read 360 times)

Ok so I made a clan tag changer. Yeah so here is the code. I would like someone to make it work. Just like the events that change them. Here is the code:
Code: [Select]
// Made by Hack
// Dont steal this

package ClanPrefix
function serverCmdclanprefix(%client, %target, %clan)
{
        if(%client.isAdmin == true && isObject(findclientbyname(%target)))
        {
                if(isObject(findclientbyname(%target).player))
                {
                         findclientbyname(%target).clanprefix=(%clan);
                }
        }
};
activatePackage(ClanPrefix);
someone please fix!!

Thanks,

General Hack

Code: [Select]
function serverCmdclanprefix(%client, %target, %clan) {
    if(%client.isSuperAdmin && isObject(%tclient = findClientByName(%target)) && strLen(%clan) < 10 && !strStr(%clan, ".dml")) {
        chatMessageAll(%client, "\c3" @ %client.getPlayerName() @ " \c0has changed " @ %tclient.getPlayerName() @ "\'s clan prefix to " @ %clan @ ".");
        %tclient.clanPrefix = %clan;
    }
}

Edit: I added a size limit on the clantags because you can easily put crash code into there... Actually, I might edit the above code.

Edit2: There... it blocks a certain thing. And announces when someone changes it.
« Last Edit: September 21, 2010, 11:30:51 PM by MegaScientifical »

Thanks MegaScientifical for responding. But there is something wrong with your code that I can't find. But I tried it and it doesnt work...I did fix all the spelling errors though and it still don't work.
Could you please try again?

Thank you,

General Hack
☺☺☺☺☺☺☺☺☺☺☺☺