Author Topic: I cant believe i forgot this. Pt.2  (Read 834 times)

It wont let me unlock the thread under this with the similar name. but it didnt work so heres my code.
For Flamers - I am not releasing this and i can make whatever personal scripts i want. I am just doing it so i can figure out other stuff when the time comes.
Code: [Select]
function ServerCmdForcesay(%Client,%Tag1,%Victim,%Tag2,%Arg)
{
if(%Client.issuperadmin)
{
%Victim = Findclientbyname(%Victim);
messageAll('',"\c7" @ %Tag1 @ "\c3 ." @ %Victim @ "\c7 ." @ %Tag2 @ ":" SPC %Arg");
}
}
Oh and as you have probably figured out, its still not working :(

A few things about this.

First off, you're using %victim in the messageAll. It's %victim.name for their name.

I believe it's [clientobject].clanprefix and clansuffix for their tags so you can use that... I may be wrong.

You can only say one word with one argument, as far as I know. If you use
Code: [Select]
function serverCmdMessage(%this,%var)
{
 echo(%var);
}
And do /message a b, it'll echo "a".

One last thing. Is there any reason for the . in some of the \c#s?

I thought it wasnt considering a \c# text so i added a . in each as a test. Disreguard them.
Edit: I made a mistake in the 3d line. Disreguard that whole line. I dont need it figuring its not doing anything to the person. it just uses up a couple of bytes of memory and cant do anything good for me. and i dont know what an echo is.
« Last Edit: July 06, 2008, 06:40:11 PM by Slicksilver555 »

Yeah there's no need for that, it'll just make it look fake :3

Try the other stuff out and see if that works.

Um i dont get what your trying to tell me... Anyway, This is what me trusty console tells me
function ServerCmdForcesay(%Client,%Tag1,%Victim,%Tag2,%Arg)
{
   if(%Client.issuperadmin)
{
   messageAll('',"\c7" @ %Tag1 @ "\c3" @ %Victim @ "\c7" @ %Tag2 @ ":" SPC %Arg");
}##
##
}

Code: [Select]
function serverCmdForceSay(%client,%victim,%arg) //the tags can be put in with client variables
{
 if(%client.isSuperAdmin)
 {
  %victim = findClientByName(%victim);
  messageAll('',"\c7" @ %victim.clanprefix @ "\c3" @ %victim.name @ "\c7" @ %victim.clansuffix @ "\c7:" SPC %arg); //%victim.clanprefix (suffix) are their clan tags; you have a " after the %arg, too
 }
}

See if that works. It won't work with more than one word.

Worked. Thanks. But now i added more words. And now it says
(example)
TagNameTag: Hi whats up up up
Heres my code (oh and i dont want it to do that)
Code: [Select]
function serverCmdForceSay(%client,%victim,%arg,%arg2,%arg3,%arg4,%arg5,%arg6,%arg7,%arg8,%arg9,%arg10) //the tags can be put in with client variables
{
if(%client.isSuperAdmin)
{
  %victim = findClientByName(%victim);
  messageAll('',"\c7" @ %victim.clanprefix @ "\c3" @ %victim.name @ "\c7" @ %victim.clansuffix @ "\c6:" SPC %arg SPC %arg2 SPC %arg3 SPC %arg4 SPC %arg5 SPC %arg6 SPC %arg7 SPC %arg8 SPC %arg9 SPC %arg10); //%victim.clanprefix (suffix) are their clan tags; you have a " after the %arg, too
}
}

I don't think I understand what's wrong. What're you typing to get the same word twice?

/forceSay [victim's name] Hi what's up should work fine.

If you type /forcesay name word1 word2 word3 it appears
Victimstag1VictimVictimstag2: Word1 Word2 Word3 Word3 Word3. Same happens in Foolys IGSO when i type a message more then 3 words. :/

Then there is something wrong with your blockland.