Jump to content
  • 0
Sign in to follow this  
pust61

Donators item code need be fixed

Question

[PHP] if (player.donator == 0) {
if (item.getDefinition().getId() == 13740 || (item.getDefinition().getId() == 13887 || (item.getDefinition().getId() == 13893)) ) {
player.getActionSender().sendMessage("You need to be a donator to equip this item.");
return;
}
}[/PHP]

it works correctly, but the problem is REALLY ONLY donators can wield it, no admin or mods -.-
can someone just add simple that rights 1,2 can wield donator items 2...?
thanks

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
try this;

[QUOTE] if (player.donator != 0) {
if (item.getDefinition().getId() == 13740 || (item.getDefinition().getId() == 13887 || (item.getDefinition().getId() == 13893)) ) {
player.getActionSender().sendMessage("You need to be a donator to equip this item.");
return;
}
} [/QUOTE]

Share this post


Link to post
Share on other sites
  • 0
try this;

[QUOTE] if (player.donator != 0) {
if (item.getDefinition().getId() == 13740 || (item.getDefinition().getId() == 13887 || (item.getDefinition().getId() == 13893)) ) {
player.getActionSender().sendMessage("You need to be a donator to equip this item.");
return;
}
} [/QUOTE]

added the "!=". That symble means 'Does not equal too' so char above 0 should be able to wield.

Share this post


Link to post
Share on other sites
  • 0
nvm fixed:

[PHP]
if (player.donator == 0 && player.rights == 0 && player.rights != 1 && player.rights != 2) {
if (item.getDefinition().getId() == 13740 || (item.getDefinition().getId() == 13887 || (item.getDefinition().getId() == 13893)) ) {
player.getActionSender().sendMessage("You need to be a donator to equip this item.");
return;
}
}
[/PHP]

Share this post


Link to post
Share on other sites
Sign in to follow this  

×