Ok im using fabiano's source, my donators cant use give command,
internal class GiveCommand : Command
{
public GiveCommand()
: base("give", 1) ( the req is 1 why donators cant use the give command? ) Please help me asp
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /give <Itemname>");
return false;
}
string name = string.Join(" ", args.ToArray()).Trim();
ushort objType;
//creates a new case insensitive dictionary based on the XmlDatas
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out objType))
{
player.SendError("Unknown type!");
return false;
}
if (!player.Manager.GameData.Items[objType].Secret || player.Client.Account.Rank >= 2)
{
for (int i = 0; i < player.Inventory.Length; i++)
if (player.Inventory[i] == null)
{
player.Inventory[i] = player.Manager.GameData.Items[objType];
player.UpdateCount++;
player.SaveToCharacter();
player.SendInfo("Success!");
break;
}
}
else
{
player.SendError("Item cannot be given!");
return false;
}
return true;
}
}
Anyways to answer the question, your donators need to be ranked as 3 in the db to be able to use the command. If you look at command.cs, you'll that
Code:
private static int GetPermissionLevel(Player player)
{
if (player.Client.Account.Rank == 3)
return 1;
return 0;
}
This gets the rank from the database (3) and then returns the rank value one in the server which is the value for running the command. All other numbers won't work as it will return the value 0 which won't allow it to use that command
Anyways to answer the question, your donators need to be ranked as 3 in the db to be able to use the command. If you look at command.cs, you'll that
Code:
private static int GetPermissionLevel(Player player)
{
if (player.Client.Account.Rank == 3)
return 1;
return 0;
}
This gets the rank from the database (3) and then returns the rank value one in the server which is the value for running the command. All other numbers won't work as it will return the value 0 which won't allow it to use that command
Anyways to answer the question, your donators need to be ranked as 3 in the db to be able to use the command. If you look at command.cs, you'll that
Code:
private static int GetPermissionLevel(Player player)
{
if (player.Client.Account.Rank == 3)
return 1;
return 0;
}
This gets the rank from the database (3) and then returns the rank value one in the server which is the value for running the command. All other numbers won't work as it will return the value 0 which won't allow it to use that command
Anyways to answer the question, your donators need to be ranked as 3 in the db to be able to use the command. If you look at command.cs, you'll that
Code:
private static int GetPermissionLevel(Player player)
{
if (player.Client.Account.Rank == 3)
return 1;
return 0;
}
This gets the rank from the database (3) and then returns the rank value one in the server which is the value for running the command. All other numbers won't work as it will return the value 0 which won't allow it to use that command
Why did you get my comment deleted?! He deserved it! You dont know what he did to me...
Originally Posted by Skullquick
Why did you get my comment deleted?! He deserved it! You dont know what he did to me...
Because it was off-topic as it didn't help and you could've gotten an infraction for it if I told the higher-ups so you should be grateful I didn't
Originally Posted by Hunter's Best Sheep
Because it was off-topic as it didn't help and you could've gotten an infraction for it if I told the higher-ups so you should be grateful I didn't