Wherever your levels are handled, say Attack for example, make it handle playerRights
|
like how can i make items for donator or admin?
Source: project insanity!
ok, thanks.
PlayerAssistant.java >Add example;Code:public void getRequirements(String itemName, int itemId) {Code:if (itemName.contains("infinity")) { c.Donatorreq = 1;
dostn work
ItemAssistant.java, search for:
Above that, add:public int[][] brokenBarrows
Replace the "ID"s with Item ID's you want to be donator's only.public static final int[] donatorItems = {ID, ID, ID, ID};
Then, under:
Add:public boolean wearItem(int wearID, int slot) {
You're done! Goodjob!if(c.isDonator == 0) (Or whatever you call your Donator token, for examle "memberstatus".)
for(int i : donatorItems)
if(wearID == i) {
c.sendMessage("Please donate to use this or blabla...");
return false;
}
declare a boolean and make it save to char files
when ppl are donators the boolean goes true
else false
and then make the item requirements check if boolean is true else sendmessage "must be donator "
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |