Ok some of you may think coding is very hard. It is o.o no no calm down its not that bad... kinda :s
Ok well first you mgiht wanna see a layout of a code. i will explain the different points of it.
- Code:
-
if(command.equalsIgnoreCase("item")&& playerRights >= 1){ the 1 equals player rights(command.equalsIgnoreCase("item")){ <--- the command ::item
disconnected = true;
addItem(0995,1); [color=red]<---the item you recieve and amount[/color]
sendMessage("send message 1"); <--a message that appears on the chat box
sendMessage("send message 2"); <-- second message you recieve on the chatbox
} <-- very important. it meens the code has ended. and you dont get it mixed up with other codes.
heres an example you might propoly understand:
- Code:
-
if(command.equalsIgnoreCase("starter")&& playerRights >= 1){ (command.equalsIgnoreCase("starter")){
disconnected = true;
addItem(0995,1);
sendMessage("You have used your starter package");
sendMessage("You have ran out of uses! ");
}
thats a starter command with only one item you recieve. Here is another starter package where you recieve many items:
- Code:
-
if(command.equalsIgnoreCase("starter")&& playerRights >= 0){ (command.equalsIgnoreCase("starter")){
disconnected = true;
addItem(0995,1);
addItem(0995,1); ]<---i added loads of items
addItem(0995,1);
addItem(0995,1);
sendMessage("you recieve your starter package"); <-- you can also change the text you recieve
sendMessage("wewt!");
}
at the end of a command you always need } to end your command.
here are player rights you add to a command so only owner, admin and or mod can use it
3 <-- thats owner player rights. only owners can use the command.
2<-- thats administrator player rights. Only admins can use that command
1<-- thats moderator player rights. Only mods can use that commands
0<-- that's normal player rights. Everyone can use that command
Theirs also hidden admin. 4 <-- those player rights make only admins and owners use the command.
the player rights go here:
- Code:
-
if(command.equalsIgnoreCase("item")&& playerRights >= 1){ <-- the number
if you want a command generator go to silabsoft and type in search: Command generator
I cant give u download link because i don't have virus scan :S
Got any questions?? pm me or reply to this topic. Wanna have a conversation about it???
add
the_a_dude@hotmail.com i wont discuss stuff on the game. i will be on msn
want me to make different guides for coding? suggest them in a pm or a reply post