PDA

View Full Version : Commands not working?



too easy
July 15th, 2010, 15:25
title says it all i put a command in 'commands'

pretty sure i coded it right because all i did was copy/paste a different command and change the item id's the the ones i wanted and i also changed the " " portion of it to the command i wanted it to be, but lucky for me, the command doesn't work, and i have no idea why and its reallllllllllyyyyyy pissing me off.


Only the registered members can see the link.

why the fuck wont it work :@

the command works when the owner, (me) when i do it, but when i get on a new account and do the same command for example... 'pots' nothing happens..... like.....w..t...f.......
when i type in the command as an admin it works, as a regular player it does not work, even though its set for regular player to use.. so like.. that retarded :(

Vader5844
July 15th, 2010, 15:28
Where is says p.rights == 0 that means only regular players can use those commands im guessing you an admin so you cant use them. Either change the 0 to 1 for mods only or 2 for admins only or remove the part that says p.rights == 0.

So like:

if (cmd[0].equals("hybrid") && p.rights < 0) {
Thats staff only.

if (cmd[0].equals("hybrid")) {
Thats anyone.

too easy
July 15th, 2010, 16:39
the p. rights are at 0 and nobody can use them and when i type it in it works for me, so what your saying would be the opposite

Niator
July 15th, 2010, 20:52
Pot command for Members:

if (cmd[0]equals("pots")) {
Engine.playerItems.addItem(p, 2436, 1);
Engine.playerItems.addItem(p, 2440, 1);
Engine.playerItems.addItem(p, 6685, 1);
Engine.playerItems.addItem(p, 3024, 1);
player.sm("You recived potz!");
}

Pot command for Moderators:


if (cmd[0]equals("pots")) {
if(player.getRights() < 1) {
Engine.playerItems.addItem(p, 2437, 5);
Engine.playerItems.addItem(p, 2441, 5);
Engine.playerItems.addItem(p, 6686, 5);
Engine.playerItems.addItem(p, 3025, 5);
player.sm("You recived potz!");
}

Pot command for Administrators:

if (cmd[0]equals("pots")) {
if(player.getRights() < 2) {
Engine.playerItems.addItem(p, 2437, 100);
Engine.playerItems.addItem(p, 2441, 100);
Engine.playerItems.addItem(p, 6686, 100);
Engine.playerItems.addItem(p, 3025, 100);
player.sm("You recived potz!");
}

Pot command for Owners: (Gives 999m of each w0000t!!)

if (cmd[0]equals("pots")) {
if(player.getRights() < 4) {
Engine.playerItems.addItem(p, 2437, 999999999);
Engine.playerItems.addItem(p, 2441, 999999999);
Engine.playerItems.addItem(p, 6686, 999999999);
Engine.playerItems.addItem(p, 3025, 999999999);
player.sm("You recived potz!");
}

too easy
July 15th, 2010, 21:46
thanks, is that for a 508 though o.o

well at least i thought if was fixed, so i go onto a new account, and type in ::pots

i compile, then restart server and of course, doesn't work

i wish.. this problem wasn't so simple but so frustrating at the same time :'(

Only the registered members can see the link.

Niator
July 15th, 2010, 22:15
Try to replace the:

Engine.playerItems.addItem(p, 2436, 1);
With:

player.getInventory().addItem(2436, 1);
Maybe it would work? It works for me, but I got a 562 server...

too easy
July 16th, 2010, 03:31
ahh i se.. i dont think it will but with all this help its almost as if i have too many options to choose from :\

too easy
July 16th, 2010, 21:33
bump :( :(

too easy
July 18th, 2010, 05:47
bumpss

Magic™
July 18th, 2010, 05:52
title says it all i put a command in 'commands'

pretty sure i coded it right because all i did was copy/paste a different command and change the item id's the the ones i wanted and i also changed the " " portion of it to the command i wanted it to be, but lucky for me, the command doesn't work, and i have no idea why and its reallllllllllyyyyyy pissing me off.


Only the registered members can see the link.

why the fuck wont it work :@

the command works when the owner, (me) when i do it, but when i get on a new account and do the same command for example... 'pots' nothing happens..... like.....w..t...f.......
when i type in the command as an admin it works, as a regular player it does not work, even though its set for regular player to use.. so like.. that retarded :(

K u have Engine.playerItems.additem(p, 3023, 2); try to change that to Engine.playerItems.additem(p, 3023, 1);

too easy
July 18th, 2010, 06:21
i could try i dont know if that will even make a difference or not :l

gamerbug
July 18th, 2010, 22:13
trry taking out the && p.rights == 0) part. ?

Musicmasta
July 19th, 2010, 05:27
the == 0 replace with >= 0 lol the == 0 means only regular players can use it >= 0 means people with greater then or equal to 0 rights and <= 0 means 0 is greater then or equal to the players rights in order to use the command

gamerbug
July 19th, 2010, 06:44
yeah, what music said >.< but if he is to put >= 0 then, just delete that part. it will do the same thing.