It worked! Thanks a lot Patskie btw, what about if I bind @item.. Let's say like this:
- script commands_limit -1,{
OnInit:
bindatcmd("item","commands_limit::OnAtcommandItem",0,0);
setarray .@item[0],501,502,503,504;
end;
OnAtcommandItem:
if(.@atcmd_parameters$[0]) != .@item[0]){ // if they @item an item which is not in the array this message will pop out
mes "You're not allowed to @item this kind of item";
close;
}
atcommand "@item " +.@atcmd_parameters$[0];
end;
}
The texts marked with RED are the script that i'm not sure xD
I'm bad with arrays so I don't really know how to use them.. But I wanted it to work like that.
I hope you got my point here.