Blockland Forums > Modification Help
is this script messed up?
nforce:
this is my script:
function serverCmdpoop (%client,%target)
{
if (%client isAdmin == True && isObject (findclientbyname(%target)))
{
echo("serverCmdpoop triggered by "@%client.name@" and was targetting "@findclientbyname(%target).name@"!");
if(isObject(findclientbyname(%target).player))
{
messageAll ('',<color:ffffff> <font:impact:30> findclientbyname (%target).name@"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
}
}
}
i dont know why but for some reason it just wont work. If theres something wrong with it please tell me. thanks
DrenDran:
--- Quote from: nforce on June 23, 2010, 12:20:24 PM ---this is my script:
function serverCmdpoop (%client,%target)
{
if (%client isAdmin == True && isObject (findclientbyname(%target)))
{
echo("serverCmdpoop triggered by "@%client.name@" and was targetting "@findclientbyname(%target).name@"!");
if(isObject(findclientbyname(%target).player))
{
messageAll ('',<color:ffffff> <font:impact:30> findclientbyname (%target).name@"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
}
}
}
i dont know why but for some reason it just wont work. If theres something wrong with it please tell me. thanks
--- End quote ---
I think messageAll takes two arguments. Like this.
messageAll ("",'',<color:ffffff> <font:impact:30> findclientbyname (%target).name@"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
Crysist:
--- Quote from: DrenDran on June 23, 2010, 12:34:59 PM ---I think messageAll takes two arguments. Like this.
messageAll ("",'',<color:ffffff> <font:impact:30> findclientbyname (%target).name@"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
--- End quote ---
Nope, only one. Yet he messed it up, It should be:
--- Code: ---messageAll ('',"\c2"@%target.name@"\c5 is a piece of poop!");
--- End code ---
Headcrab Zombie:
--- Code: ---messageAll ('',"<color:ffffff><font:impact:30>" @ findclientbyname(%target).name @ " is a piece of poop, OMG!");
--- End code ---
Crysist's wouldn't work because %target in nForce's function is part of a name, not a client, but his line refers to %target as a client
And though it isn't something that would make it not work, the color and font isn't the same as what he wanted.
nforce:
--- Quote from: DrenDran on June 23, 2010, 12:34:59 PM ---I think messageAll takes two arguments. Like this.
messageAll ("",'',<color:ffffff> <font:impact:30> findclientbyname (%target).name@"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
--- End quote ---
Well i looked on the rtb wiki and it only took one.....