27.08.2014, 23:46
PHP код:
@Command
public boolean giveveh(Player p, String target, int model, int color1, int color2)
{
if(p.getVarInt(VAR_ADMIN_LEVEL) < GIVE_VEH_LEVEL)
{
p.sendMessage(new Color(-1), MESSAGE_LOW_LEVEL);
return true;
}
// ...
return true;
}
@Command
public boolean giveweap(Player p, String target, int weapon, int ammo)
{
if(p.getVarInt(VAR_ADMIN_LEVEL) < GIVE_WEAPON_LEVEL)
{
p.sendMessage(new Color(-1), MESSAGE_LOW_LEVEL);
return true;
}
// ...
return true;
}
And also I need to checking target's isOnline in all commands, how can I automatize all of it?