[Tut - 508] Item On Players

Re: [508] Item On Players

and yet again , I'll fix that code :
Code:
			int usedItem = p.stream.readUnsignedWord();
			int usedOn = p.stream.readUnsignedWordA();
			PlayerItems pi = new PlayerItems();
			int[] partyHat = {1038,1040,1042,1044,1046,1048};
			if(usedItem == 962 && usedOn <= Engine.maxPlayers)  
			{
				pi.addItem(p, partyHat[1], 1);
				p.frames.sendMessage(p, "Someone cracked a cracker on you!");
				pi = null;
			}

A tip:
if you are lazy , press quote button in rune-server , and copy all that , and add credits , so codes wont mess up.
 
Back