;'God - Clear Inventory'

TargetID = GetUserFlag(#USERID, 45)

MSG=Lower(GetUserMessage(#USERID))

ItemID = GetItemID(MSG)

If ItemID > 0
	If HasItem(TargetID,ItemID) = 0
		SendMessageToUser(#USERID,GetUserName(TargetID)+" doesn't have any "+GetItemName(ItemID)+"s.",#MSG_SERVER)
		GoTo END
	EndIf
	While HasItem(TargetID,ItemID) = 1
		TakeItem(TargetID,ItemID)
	Wend
	SendMessageToUser(#USERID,GetUserName(TargetID)+"'s "+GetItemName(ItemID)+"s have been removed.",#MSG_SERVER)
ElseIf MSG="all"
	i=0
	While i < 32
		ItemID=GetUserInvItem(TargetID,i)
		If ItemID > 0
			TakeItem(TargetID,ItemID)
		EndIf
		i=i+1
	Wend 
	SendMessageToUser(#USERID,"All "+GetUserName(TargetID)+"'s items have been taken away.",#MSG_SERVER)
Else
	SendMessageToUser(#USERID,"Please state a item name to remove all of that item from the targetted user, or say 'all' to take all his items away.",#MSG_SERVER)
EndIf

Label END

Continue = 1