function servercmdcheck(%this, %item)
{
if(!isObject(%this.player)){return;}
while(%i<=4){
if(firstWord(%this.player.tool[%i].uiName) $= %item){
echo("You have this item");
}
%i++;
}
}
There. Slightly easier to use, put in "/check Gun" and it checks whether you have a gun, etc. "/check Rocket L." will actually only look for "Rocket" but will still work - first word is being checked.
Terror, it's %this.player.tool[%i].getName();.