Author Topic: Problem with Client seeing his text.  (Read 1542 times)

I have the code perfect, but I want one more thing, can someone edit the code to where admins and only that client can see the message he sent using !.
http://pastebin.com/mJJmRA1W
« Last Edit: May 09, 2013, 11:47:47 PM by Juicebox² »

You have $Ta:key at the top, it should be $TA::Key.

that's not the issue though, I want it so the client that sent the message and admins can see it, not everyone.

would it be

                %c = clientGroup.getObject(%i);
                if(%c.isAdmin && %client)
                messageClient(%c,'',"\c7[\c5To Admins\c7]\c3" @%client.name@ "\c6:" SPC %col @ %message);

Replace that snippet with
Code: [Select]
%c = clientGroup.getObject(%i);
if(%c.isAdmin && %c != %client)
    messageClient(%c,'',"\c7[\c5To Admins\c7]\c3" @%client.name@ "\c6:" SPC %col @ %message);
And after the loop, put
Code: [Select]
messageClient(%client,'',"\c7[\c5To Admins\c7]\c3" @%client.name@ "\c6:" SPC %col @ %message);
   
« Last Edit: May 10, 2013, 09:04:12 AM by Zeblote »

Where would the loop be?

Code: [Select]
    for(%i=0;%i<%count;%i++)
    {
        %c = clientGroup.getObject(%i);
        if(%c.isAdmin && %c != %client)
            messageClient(%c,'',"\c7[\c5To Admins\c7]\c3" @%client.name@ "\c6:" SPC %col @ %message);
    }
    messageClient(%client,'',"\c7[\c5To Admins\c7]\c3" @%client.name@ "\c6:" SPC %col @ %message);

Where are you getting %col from?

Where are you getting %col from?
Good question.
It was in his code before so I guess he just forgot to set it to something

It's so that it automatically adds a space after @, for some reason when I don't add %col it gives errors.

like @hi.

Just put

messageClient(%c,'',"\c7[\c5To Admins\c7]\c3" @ %client.name@ "\c6:" SPC %message);