Morning,
Brace ya self, another n00b question coming :-P
Currently I'm using the sm cash plugin by ferret as a base for another plugin however its using SearchForClients() function to locate the target, when compiling, it gives a warnign that its depreciated.
However when I try the alternatives [FindTarget() or ProcessTargetString()] I receive back:
'argument type mismatch (argument 1)'
This is what I have written, can some point me in the right direction to using one of the alternatives? Where 'name' is the target
PHP Code:
// find a target
new iClients[3];
new iNumClients = FindTarget(name, iClients, 3);
if (iNumClients == 0)
{
PrintToChatAll("\x04[SM Colour]\x01 No matching client");
//ReplyToCommand(client, "[SM Colour] %t", "No matching client");
return Plugin_Handled;
}
else if (iNumClients > 1)
{
PrintToChatAll("\x04[SM Colour]\x01 More than one client matches");
//ReplyToCommand(client, "[SM Colour] %t", "More than one client matches", name);
return Plugin_Handled;
}
else if (!CanUserTarget(client, iClients[0]))
{
PrintToChatAll("\x04[SM Colour]\x01 Unable to target");
//ReplyToCommand(client, "[SM Colour] %t", "Unable to target");
return Plugin_Handled;
}
other code here....
BTW once this is done, I'll be ready to release it!
Matt
__________________