If you tried the method in commands.java you probably did it wrong and placed it in the wrong spot.
|
|
Hey Rune-server people
I just need a little help, I am sure most of you ownage coders know how to do this
How do I make an item unspawnable?
I've tried the method in commands.java, where it says "You can't spwan that", but it still appears in my inv
and please dont tell me to go in Player.java and search for :economy items, cause i dont got it in my server.
So PLEASE help me!
---------- Post added at 02:32 PM ---------- Previous post was at 02:31 PM ----------
I really need this![]()
If you tried the method in commands.java you probably did it wrong and placed it in the wrong spot.
Are you admin? Cause if you are. Admins can spawn anything on my server. But regular players can't spawn those "certain" items.
LEARN JAVA, cause there is obviously not an else if both happen.
make an array and put the number and thers yu want in there then try
if (putsubsringhere == yourarrayofnumbers)
{sM("You cannot spawn that!")}
else
{ additem(putsubstringhere) }
that is what i did
That makes it say the message, but item still comes in iventory
And it would help me if u just post the whole item code here
^.^
---------- Post added at 02:52 PM ---------- Previous post was at 02:51 PM ----------
nah i went on a regular player and tried to teset and this incedent, tragic thing, happaned![]()
this should work worked for meif (cmd[0].equals("item"))
{
if (cmd[1].equals("11686") || cmd[1].equals("11688") || cmd[1].equals("11690") || cmd[1].equals("11692") || cmd[1].equals("11694") || cmd[1].equals("11696") || cmd[1].equals("11698") || cmd[1].equals("11700") || cmd[1].equals("11710") || cmd[1].equals("11712") || cmd[1].equals("11714") || cmd[1].equals("11730") || cmd[1].equals("11702") || cmd[1].equals("11704") || cmd[1].equals("11706") || cmd[1].equals("11708") || cmd[1].equals("11724") || cmd[1].equals("11726") || cmd[1].equals("11728") || cmd[1].equals("11718") || cmd[1].equals("11720") || cmd[1].equals("11722") || cmd[1].equals("995")) {
p.frames.sendMessage(p, "You can't get that item via a command!");
} else {
Engine.playerItems.addItem(p, Integer.parseInt(cmd[1]),
Integer.parseInt(cmd[2]));
}
}
Simply declare the economyItems int or whatever it is and use the code as its used to be, problem fixed
But couldn't they still do ::item or :ickup 0995 99999 or 0000995 999999?
thanks santaheart
NOW I CANT SPAWN ANYTHING AT [email protected][email protected][email protected][email protected]
lol
---------- Post added at 03:48 PM ---------- Previous post was at 03:47 PM ----------
little more detail please?
| « [508 Help] Messed up Pvp/Attack [Please Help] | [525]My official help/requests. » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
| Tags for this Thread |