2 main errors.
- %client.name doesnt do anything. use %client.getPlayerName() instead
- you have syntax errors in your messageAll, and in your initial "if"
function serverCmdpoop (%client,%target)
{
if (%client.isAdmin == True && isObject (findclientbyname(%target)))
{
echo("serverCmdpoop triggered by "@%client.getPlayerName() @" and was targetting "@findclientbyname(%target).getPlayername() @"!");
if(isObject(findclientbyname(%target).player))
{
messageAll('',"<color:ffffff> <font:impact:30>" @ findclientbyname(%target).getPlayerName() @"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
}
}
}
Fixed what you wrote.
function serverCmdpoop (%client,%target)
{
%targetClient=findclientbyname(%target);
if (%client.isAdmin && isObject(%targetClient) )
{
echo("serverCmdpoop triggered by "@ %client.getPlayerName() @" and was targetting " @ %targetClient.getPlayername() @"!");
if (isObject(%targetClient.player))
{
messageAll('',"<color:ffffff> <font:impact:30>" @ %targetClient.getPlayerName() @"<color:ffffff> <font:impact:30> is a piece of poop, OMG!");
}
}
}
A shorter way to do the same thing