PHP Code:
function onPlayerchats()
{
if (player.chat == "/open account")
{
if (player.weapons.index(findweapon("-Bank/Account")) > 0)
{
say2("You already have a bank account");
}
else
{
say2("You have opened a bank account!");
player.addWeapon("-Bank/Account");
}
}
You should use php tags for your code, and styling the code makes it easier to read.
And you were also missing an opening bracket in your else statement.